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

Fallback Form #22

Closed
Zetouny opened this issue Feb 6, 2013 · 12 comments
Closed

Fallback Form #22

Zetouny opened this issue Feb 6, 2013 · 12 comments
Assignees
Labels
bug Bug in the library priority Should be fixed ASAP

Comments

@Zetouny
Copy link

Zetouny commented Feb 6, 2013

For sure we have to take a look on the fallback form. The first point is the form does not have the same "paramName" which will lead to upload the files somewhere else :D.

My second point is that that uploading process does not goes like the original upload, what I've meant is when the upload button got pressed the page navigate away to the provided URL without giving the same results !

@ghost ghost assigned enyo Feb 6, 2013
@enyo
Copy link
Collaborator

enyo commented Feb 6, 2013

What would you expect the fallback form to do? Since the browser doesn't support the fallback, I can only post it there...

As for the paramName, it'll be fixed in a bit.

enyo added a commit that referenced this issue Feb 6, 2013
@enyo
Copy link
Collaborator

enyo commented Feb 6, 2013

I'll merge the changes in the master branch as soon as we've cleared the upload process. Please explain what you'd expected from the fallback form.

@Zetouny
Copy link
Author

Zetouny commented Feb 6, 2013

Thanks for the replay, well, at least it send the file using ajax with a success message!

@enyo
Copy link
Collaborator

enyo commented Feb 6, 2013

Ok, will do. This will take a bit longer though, so I'm merging the current changes now.
I created a new issue for it #23

@enyo enyo closed this as completed Feb 6, 2013
@Zetouny
Copy link
Author

Zetouny commented Feb 6, 2013

Thank you, I might asked a lot, But these his would be a great changes ;)

@enyo
Copy link
Collaborator

enyo commented Feb 6, 2013

I'm happy about everybody contributing. If it's a feature you're missing, it's a feature worth implementing.

@Zetouny
Copy link
Author

Zetouny commented Feb 6, 2013

LIKE :D

@mjza
Copy link

mjza commented Apr 9, 2013

your code has a bug

It can't detect opera browser

I know that you defined Opera as a non supported browser but your code can't detect it.

So I change your code as follow

      Dropzone.blacklistedBrowsers = new Array();
      Dropzone.blacklistedBrowsers[0]=[/opera.*version\/12/i];
      Dropzone.blacklistedBrowsers[1]=[/Macintosh.*version\/12/i];
      Dropzone.isBrowserSupported = function() 
  {
    var capableBrowser, regex, _i, _len, _ref;

    capableBrowser = true;

     if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) 
{

      if (!("classList" in document.createElement("a"))) 
          {
            capableBrowser = false;
          } 
          else 
          {
          for(_j=0;_j<Dropzone.blacklistedBrowsers.length && capableBrowser;_j++)
              {
                    _ref = Dropzone.blacklistedBrowsers[_j];
                    for (_i = 0, _len = _ref.length; _i < _len && capableBrowser; _i++) 
                            {
                                  regex = _ref[_i];
                                  if (regex.test(navigator.userAgent)) 
                                    capableBrowser = false;
                            }
                          }
                      }
                } 
                else 
                {
                  capableBrowser = false;
                }

                return capableBrowser;
          };

@enyo
Copy link
Collaborator

enyo commented Apr 9, 2013

What is your browser agent string?

@mjza
Copy link

mjza commented Apr 10, 2013

Opera/9.80 (Windows NT 5.1) Presto/2.12.388 Version/12.14

@enyo
Copy link
Collaborator

enyo commented Apr 10, 2013

I'll have a look at it. The regex is fine as is and shouldn't be changed. It's only there as a hack to blacklist browsers that provide the required API but don't implement it correctly. Apparently I need to improve the API check so Opera 9x doesn't pass.

@enyo
Copy link
Collaborator

enyo commented Apr 10, 2013

I created an issue for it @mjza : #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in the library priority Should be fixed ASAP
Projects
None yet
Development

No branches or pull requests

3 participants