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

Drag and Drop file uploads with uppy #505

Merged
merged 9 commits into from
Oct 29, 2022

Conversation

jcn
Copy link
Member

@jcn jcn commented Oct 27, 2022

Replace the old s3_file_field gem with uppy and add a caption field to uploaded images.

Also, this hopefully addresses #211 (still have no idea what is causing this but hopefully switching to Uppy will prevent it).

jcn added 5 commits October 26, 2022 12:24
Uppy holds on to files so you can't upload duplicates, but this is
a problem if you add a file, remove it with the "remove" button, then
decide you want to add it back again. We now hold on to the internal
uppy file ID in a data element so we can remove it.
@jcn jcn force-pushed the jcn/image-uploads branch from 42f77b0 to 599d854 Compare October 27, 2022 05:29
@jcn jcn marked this pull request as draft October 28, 2022 15:41
jcn added 2 commits October 28, 2022 13:01
Still need to add an "application description" which would be more
descriptive language about why this image was included vs just a
caption, as well as adding an alt text field, but we will iterate
to get that right in the future.
It seems to me like you'll never want to re-use a photo caption
so I think the autocomplete would just be confusing.
@jcn jcn marked this pull request as ready for review October 28, 2022 23:47
jcn added 2 commits October 28, 2022 20:03
…nst Uppy's filecount

Uppy keeps track of uploaded files, which is useful when autoproceed
is off, but when it is on, then once a file is successfully uploaded
we don't want it to be in Uppy's internal upload list because those
files also count against the total number of files allowed as per the
restrictions hash. i.e. If a project has 3 images, and you upload one,
then reset the restrictions to 1 remaining, you will be unable to
upload any more because the one you just uploaded will be the "1" that
you are restricted to.
@jcn jcn merged commit 882e4bb into awesomefoundation:master Oct 29, 2022
@jcn jcn deleted the jcn/image-uploads branch October 29, 2022 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant