Forum Discussion

DaveWi's avatar
DaveWi
Khoros Alumni (Retired)
9 years ago

Help with v1 Album.images.upload api?

Can any lithium developer help me to understand the intended usage of the v1 Album.images.upload api?  Looking at the documentation, I see that the endpoint accepts a 'image.content' parameter.  My q...
  • DaveWi's avatar
    9 years ago

    Documenting the solution to my own question here.  The ''images/upload' api seems to expect multi-part form data and the 'image.content' param expects raw image bytes (not base64 encoded).  Also, the ''image.content'' doesn't really seem to be optional.

     

    curl -v -F image.content=@/path/to/upload/image.jpeg "http://community.lithium.com/community-name/restapi/vc/users/id/[id] /media/albums/default/public/images/upload?restapi.session_key=[redacted]"