File Copy
POST {{protocol}}://{{media_storage_url}}/file/copy
Copy a file from a remote URL into the storage bucket.
This is admittedly not as simple as it should be because I've added in allowing some copies to fail while others succeed as part of the same request.
Body: raw JSON
{
"storageProvider": "",
"bucketName": "",
"filenamesUrls": {
{{file_id}}: ["fileName", "sourceUrl"]
}
}
name | description |
---|---|
storageProvider | [string] Required. Storage Provider. accepted value is gcp |
bucketName | [string] Required. Name of storage bucket pulled off the media manager /bins endpoint |
filenamesUrls | [object] Required. Filename and Source URL in this format: {file_id: [fileName, sourceUrl]} |
RESPONSES
status: Created
{"message":"Results returned","status":"Created","data":{"3-34b0d8e-u5wtc":{"originalName":"zesty-logo.png","name":"zesty-logo.HkkTQSpvp.png","storageUrl":"https://zesty-a70d78eb1b2356e28e464bf46f9639a593bd0f16.storage.googleapis.com/zesty-logo.HkkTQSpvp.png","sizeBytes":18962,"mimetype":"image/png"}},"code":201}