indiekit icon indicating copy to clipboard operation
indiekit copied to clipboard

Order of referenced and attached photos and alternative text in post request not maintained

Open paulrobertlloyd opened this issue 5 years ago • 1 comments

In the rare instance a post request includes a URL to a photo, and a photo to upload, and each has associated alt text, these values will not stay in sync, leading to the possibility of the following output:

---
photo:
  - url: https://external-website.example/referenced-photo.jpg
    alt: Attached photo
  - url: https://my-website.example/media/photos/2020/07/10/vld2q.jpg
    alt: Referenced photo
---

paulrobertlloyd avatar Sep 01 '20 20:09 paulrobertlloyd

Might a Map() be able to help here?

paulrobertlloyd avatar Jan 23 '22 13:01 paulrobertlloyd

As currently implemented (and I suspect how the implementation will remain), it’s not actually possible to post to the media endpoint with some media properties including file attachments and some providing URL values (both multer and express-fileupload ignore text values in an array with other values that contain files).

And when I test adding a mix of photos that are both file uploads and URLs, the appear with the correct alt text (this is using the media endpoint to upload individual files, so the situation above does not apply either).

Closing this as both won’t fix and fixed. 🤪

paulrobertlloyd avatar Nov 07 '22 17:11 paulrobertlloyd