Fallback Form #22

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

Projects

None yet

3 participants

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 !

@enyo enyo was assigned Feb 6, 2013
Owner
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 enyo added a commit that referenced this issue Feb 6, 2013
@enyo enyo Adding the enctype and method now if falling back to default upload.
This also improves the fallback form. #22
7f499b6
Owner
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 commented Feb 6, 2013

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

Owner
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 Feb 6, 2013
Zetouny commented Feb 6, 2013

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

Owner
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 commented Feb 6, 2013

LIKE :D

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;
          };
Owner
enyo commented Apr 9, 2013

What is your browser agent string?

mjza commented Apr 10, 2013

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

Owner
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.

Owner
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