Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement an "attachments" type Form field implementation #4458

Open
5 tasks
jrobbins opened this issue Oct 18, 2024 · 0 comments
Open
5 tasks

Implement an "attachments" type Form field implementation #4458

jrobbins opened this issue Oct 18, 2024 · 0 comments
Assignees

Comments

@jrobbins
Copy link
Collaborator

jrobbins commented Oct 18, 2024

As a place-holder during development we can start with treating an attachments field just like a list of URLs. That will display them as text rather than images. And, the user could add an arbitrary URL or delete them.

Once this is implemented, the user will see a better UX:

  • Display each attachment as a thumbnail image
  • Offer an X icon to delete each attachment
  • Offer an upload button to immediately choose and upload an image file using the attachments API.
  • While the attachment is uploading, the upload button would be disabled and show "Uploading...".
  • After the attachment has uploaded, the attachment URL would be added to the list of URLs for this field and immediately display a thumbnail.

Note that the upload process immediately stores the attachment on the server, but it is not associated with the current feature entry until the user successfully submits the form. So, we need to explain that to the user, and have the usual onbeforeunload protections. Also, we need to explain limits on upload size and file types (png, jpg, gif, webp).

Future work: Also support non-image attachments and display a text-file icon, PDF icon, movie icon, or other appropriate icon instead of a thumbnail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant