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

commented Jan 18, 2019

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

Fix #5556

@Gargron

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

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
Gargron approved these changes Feb 2, 2019
@Gargron

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Feb 2, 2019

Yes, I believe it is appropriate 👍

@Gargron Gargron merged commit 750c676 into tootsuite:master Feb 2, 2019
11 checks passed
11 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details
masanbol added a commit to masanbol/snoutsonline that referenced this pull request Feb 3, 2019
benharri added a commit to tildeverse/mastodon that referenced this pull request Mar 5, 2019
…otsuite#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
hiyuki2578 added a commit to ProjectMyosotis/mastodon that referenced this pull request Oct 2, 2019
…otsuite#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
Projects
None yet
2 participants
You can’t perform that action at this time.