Skip to main content

Module upload

Module upload 

Source

Structs§

UploadPayload
A file to upload: its bytes and the name and type SmugMug records.
UploadResult

Constants§

LIBRARY_UPLOAD_URL
Upload endpoint for SmugMug’s Library (“All Media”): media uploaded here isn’t placed in any album/gallery. Not in SmugMug’s public API docs; discovered from the web uploader. It takes a multipart form (Media, ByteCount, Sha256Sum, optional Filepath/Title/Caption/ Keywords) and answers 201 with the standard v2 envelope ({"Response":{"Image":{...}},"Code":201}).

Functions§

parse_library_upload_response
replace_image
Replace the file content of an existing image, identified by its image URI (e.g. /api/v2/image/<key>). This uploads new bytes onto the existing image record, keeping its album placement, keywords, and other metadata, instead of creating a new image (which SmugMug rejects with 409 if an image with the same filename already exists in the album).
send_library_upload
Send the Library upload request and return the HTTP status and raw body, without interpreting either.
upload_image
upload_to_library
Upload a file to the Library (no album). filepath is sent as the Filepath field, which SmugMug describes as “the relative path to the photo or video itself on the uploader’s file system”.