Expose an S3 PUT URL on existing images

Erwan Rouchet
2025-12-03T08:15:08Z

https://redmine.teklia.com/issues/12470

The RetrieveImage, PartialUpdateImage and UpdateImage APIs should return an s3_put_url, but only under the same conditions and permissions as CreateImage:

Authentification as a Django admin, or

Authentification with a verified email and the can_upload_s3_image permission

Only on images on the local server with any status other than checked.

This allows calling RetrieveImage to get the same response as CreateImage again, in the event that this response is lost at some point. This URL should not be exposed on other APIs, like a zone.image.s3_put_url in RetrieveElement.