Can I download a media item in a private gallery via REST? I'm looking to create a utility to copy one gallery and all assets to another gallery.
Can I download a media item in a private gallery via REST? I'm looking to create a utility to copy one gallery and all assets to another gallery.
You may be able to using the CFS REST endpoint. You will need to split the file URL returned from the media request. The CFS endpoint is only looking for the portion of the url after "__key".
This url:
http://trunk.local.com/cfs-file/__key/telligent-evolution-components-attachments/13-02-00-00-00-00-00-01/hawkeye.jpg
Should be retrievable with the following REST request:
http://trunk.local.com/api.ashx/v2/cfs/telligent-evolution-components-attachments/13-02-00-00-00-00-00-01/hawkeye.jpg
Thanks Mathew D'Amico - that worked to download the data. However when I try create a new media item, the item gets created, but the file data seems corrupted.
I downloaded the data as a byte[] when I pass that to the Media->Create REST endpoint do I just do a ToString() on the byte array or how do I exactly pass a byte array to that endpoint for FileData?