1

I am trying to create an entry in Sitefinity 10.1.6523.0 for an image that is already stored in Amazon S3 by another application. Using Postman and http://local.mycompany.com/api/default/images with the request...

{ "PublicationDate":"2017-04-26T09:02:51Z", "ExpirationDate":null, "Title":"Summer Day", "Description":"Summer day description", "Ordinal":26, "UrlName":"summer-day", "Author":"Mr Smith", "AlternativeText":"a summer day", "FolderId":null, "ParentId": "4e7e106a-71c7-453d-9fdf-d04c208d473f", "Url": "https://s3-eu-west-1.amazonaws.com/test.uat.images.mycompany/images/default-source/test-library/cloudfront-test-image.png?sfvrsn=fec7b25a_2", "ThumbnailUrl": "https://s3-eu-west-1.amazonaws.com/test.uat.images.mycompany/images/default-source/test-library/cloudfront-test-image.tmb-thumbnail.png?sfvrsn=fec7b25a_1" }

This gives me the error

"innererror": { "message": "Image objects cannot be created without uploading the image.", "type": "System.InvalidOperationException",

But I don't want to upload the image as its already there! Am I missing something from the request, making the wrong request??

I just want to make the image appear within Sitefinity so it can be found and used.

Any clues would be appreciated thanks!

1 Answers1

0

That's not possible - even though the image is there in the cloud, Sitefinity has no knowledge of it, so it always expects a file stream.

Basically you need to download the image and re-upload it via Sitefinity - this way it will update all the necessary DB tables, etc.

Veselin Vasilev
  • 3,698
  • 1
  • 15
  • 21
  • We have over 100000 images already so downloading each one to then re-upload it would take a massive amount of time. Surely this must be a problem others have had. Just seems crazy to not just add meta into the db for existing images. Is there really no other way? – Antony Hallworth May 02 '18 at 07:19