1

I am using the ItemWebAPI and attempting to create a media item in a subfolder of my Media Library. The documentation I am referencing for this is here: https://doc.sitecore.com/SdnArchive/upload/sdn5/modules/sitecore%20item%20web%20api/sitecore_item_web_api_developer_guide_sc66-71-usletter.pdf

Under the section "Creating Media Items" the documentation suggests that the only parameter required is name. My questions are:

1) Where and how do you define the media to be uploaded (example.jpeg) in the HTTP request?

2) Is it possible to point Sitecore to a public url of the image to handle the upload (https://www.public_url.com/for/example.jpeg)? Example of request?

For additional context, the current URL built for this request is:

POST: https://<sitecore_host>/-/item/v1/sitecore/media library/Images?sc_itemid={id_of_destination_subfolder}&name={media_item_name}

Thanks!

4
  • Hi @Alex! Can you mention the Sitecore version that you're using? Jun 15 '20 at 8:16
  • Did you check the sample code in this link - sitecoreinsight.wordpress.com/2014/04/25/… ? Jun 15 '20 at 8:24
  • @Paulson this should be version independent. I appreciate that link and it was helpful for the direct upload. Do you have insight on question 2? Uploading an image via a public url. Jun 15 '20 at 15:32
  • Do you mean uploading an image (which is available in a public URL) to the Media Library? Then the link I shared above is an example of this only. The code handles uploading an image available in this public URL logotypes101.com/free_vector_logo_png/101376/…. Jun 16 '20 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.