Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Refs #525 html5 multiple file input support #1425

Merged

Conversation

albuquerque
Copy link

Added support to upload multiple files at once.
New test added to test the feature.

Code is refactoring and cleanup of pending pull request refs #526 which seems to have been abandoned by the original author.

@mickaelandrieu
Copy link
Member

Hi,

thank you for your contribution. Would you mind to squash your commits into one with a meaningful label - like "added support for multiple file input" for instance ?

Mickaël

@albuquerque
Copy link
Author

Hi @mickaelandrieu

Squashed as requested. I hope it is right as I am doing this for the first time.

Regards,
Sam

@mickaelandrieu
Copy link
Member

Not realy :D, try this:

  1. let's rebase this for real
git rebase -i 40213c2c // your very first commit
  1. and replace every "pick" by "s" in the open window except for the first commit ("Added support for multiple file uploads").

  2. then you need to push force the branch

git commit --allow-empty && git push -f origin refs-525-HTML5-multiple-file-input-support

Mickaël

@albuquerque albuquerque force-pushed the refs-525-HTML5-multiple-file-input-support branch from e21b167 to 6571e66 Compare February 4, 2016 16:33
@albuquerque
Copy link
Author

HI @mickaelandrieu,

Followed your instructions. I had to use git commit --amend --allow-empty as it was throwing an "Aborting commit due to empty commit message" error.

However, it's now showing three additional files that are not part of my changes.
src/casperjs.cs
tests/clitests/runtests.py
tests/clitests/scripts/options.js

  • Sam

@mickaelandrieu
Copy link
Member

Yes, because your repository is not synced with n1k0's one.

git remote add casperjs https://github.com/n1k0/casperjs.git
git fetch casperjs
git checkout refs-525-HTML5-multiple-file-input-support
git rebase -i casperjs/master
git push -f origin refs-525-HTML5-multiple-file-input-support 

Mickaël

@albuquerque albuquerque force-pushed the refs-525-HTML5-multiple-file-input-support branch from 6571e66 to afd46fc Compare February 4, 2016 17:08
Added support for multiple file uploads

fixed scope of fileFieldSelector

fixed scope of fileFieldSelector

changed the check for file.path to check if length > 0 instead of 1

When file.path.length was 1 and file.path was an array(when uploading single file to a multiple input) the path would be set as a nested array. The updated behaviour will to do this only if the file.path.length is 0. This should throw a non-existent file error during paths.map

Reverted the matchEngine change

Skip the "file multiple" test on phantomjs 2.0.0

Test fails on phantomjs 2.0.0 due to a fakepath issue

Add tests for command line options

Specifically to catch options incorrectly sent to the engine instead of
the script. See #1384.

Fix assignment of options to engine vs script

Consider entire option name, not just initial chars. Fixes #1384.

fixed scope of fileFieldSelector

Reverted the matchEngine change

Skip the "file multiple" test on phantomjs 2.0.0

Test fails on phantomjs 2.0.0 due to a fakepath issue

Add tests for command line options

Specifically to catch options incorrectly sent to the engine instead of
the script. See #1384.

Fix assignment of options to engine vs script

Consider entire option name, not just initial chars. Fixes #1384.
@albuquerque albuquerque force-pushed the refs-525-HTML5-multiple-file-input-support branch from afd46fc to c9066f3 Compare February 4, 2016 17:15
@mickaelandrieu
Copy link
Member

damn, tests are now broken :/

I don't realy know why to be honest /c @istr

@istr
Copy link
Collaborator

istr commented Feb 4, 2016

damn, tests are now broken :/

That is an intermittent error (popup problem #1354), we'll hopefully have fixed very soon (root cause found by @jefleponot).

@albuquerque
Copy link
Author

Thanks for clearing that up @istr.
Thanks for the help with the commits @mickaelandrieu

@mickaelandrieu
Copy link
Member

@istr implementation sounds good to me. 👍

@istr
Copy link
Collaborator

istr commented Mar 22, 2016

@mickaelandrieu Seems complete, 👍 to merge. Could you please check if the PhantomJS 2.0.0 specific form regression ariya/phantomjs#12506 is documented somewhere in CasperJS?

@mickaelandrieu
Copy link
Member

@istr for sure it's not documented even in Casper or in phantomJS docs :)

@istr
Copy link
Collaborator

istr commented Mar 29, 2016

Ok. Opened a new issue for engine quirks documentation. Merging this one.

@istr istr merged commit ab65e0b into casperjs:master Mar 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants