Upload photos and videos
Upload files from links into a gallery.
POST https://cotlet.dev/api/v1/smugmug/galleries/{gallery_id}/photos
write Confirm
Uploads each file into the gallery and returns the new photo IDs in the order you gave. If the gallery is Public or Unlisted, the files are visible to everyone who may open it. A file that SmugMug refuses is listed with the reason and the rest are still uploaded. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| gallery_id string required | string | Gallery ID from list_galleries. |
| file_urls array required | array | HTTPS links to the files. Cotlet downloads each one and uploads it. |
Request
curl -X POST https://cotlet.dev/api/v1/smugmug/galleries/gallery_8c41d2/photos \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_urls":"https://example.com"}' result = client.call("smugmug", "upload_photos", {"gallery_id":"gallery_8c41d2","file_urls":"https://example.com"}) const result = await cotlet.call('smugmug', 'upload_photos', {"gallery_id":"gallery_8c41d2","file_urls":"https://example.com"}); cotlet call smugmug upload_photos --data '{"gallery_id":"gallery_8c41d2","file_urls":"https://example.com"}' Example response
{
"gallery_id": "Xk4RtP",
"uploaded": [
{
"photo_id": "Qm7xKd",
"filename": "DSC_3025.jpg"
},
{
"photo_id": "Rt2nWc",
"filename": "DSC_3026.jpg"
},
{
"photo_id": "Ys5pHe",
"filename": "DSC_3027.jpg"
}
],
"failed": []
}