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

Allow multiple files upload through web UI, including drag & drop #9856

Merged

Conversation

tmm576
Copy link
Contributor

@tmm576 tmm576 commented Jan 18, 2019

Maintains maximum limit of four files uploaded. Possible opportunity to abstract to instance setting.

Fix #5556

@Gargron
Copy link
Member

Gargron commented Jan 18, 2019

I have to ask, does this actually work? AJAX requests are asynchronous so making them from a loop does not guarantee sequential execution, and upload progress is a one-for-all state subtree so multiple concurrent requests for different files would be overwriting it all the time

@tmm576
Copy link
Contributor Author

tmm576 commented Jan 18, 2019

Thanks for the feedback. I see what you're saying about the interaction between the async ajax and the upload progress.

Functionally it works, but you are right. After simulating slow speeds I was actually able to see the progress bar and it's not pretty.

From what I understand, the store has only one COMPOSE_UPLOAD_PROGRESS total, so 3 uploads causes it to bounce around.

I don't think multiple types in the store would be very elegant, and certainly not extensible. I'll look into what can be done, but I'm pretty new to react/redux so any advice is appreciated.

@tmm576
Copy link
Contributor Author

tmm576 commented Jan 21, 2019

@Gargron This update keeps the single upload progress bar, but is calculated on the total of all files being uploaded.

@Gargron
Copy link
Member

Gargron commented Feb 2, 2019

Perhaps it would make sense to mark the file input as allowing multiple files, so that multiple files can be selected from the normal dialog, as well? Then you could put "Fix #5556" in your commit message

…ate update file limit logic, provide file limit feedback
@Gargron Gargron changed the title Allow drag and drop uploads of multiple files to compose Allow multiple files upload through web UI, including drag & drop Feb 2, 2019
@tmm576
Copy link
Contributor Author

tmm576 commented Feb 2, 2019

I added in some user feedback for file limits so wanted to get your opinion on using alerts this way from the action.

@Gargron
Copy link
Member

Gargron commented Feb 2, 2019

Yes, I believe it is appropriate 👍

@Gargron Gargron merged commit 750c676 into mastodon:master Feb 2, 2019
masanbol pushed a commit to masanbol/snoutsonline that referenced this pull request Feb 3, 2019
hiyuki2578 pushed a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
…stodon#9856)

* Allow drag and drop uploads of multiple files to compose

* Calculate aggregate upload progress for single action

* Allow multiple uploads to compose through traditional input, consolidate update file limit logic, provide file limit feedback
messenjahofchrist pushed a commit to Origin-Creative/mastodon that referenced this pull request Jul 30, 2021
…stodon#9856)

* Allow drag and drop uploads of multiple files to compose

* Calculate aggregate upload progress for single action

* Allow multiple uploads to compose through traditional input, consolidate update file limit logic, provide file limit feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants