Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Scaling options is ignored in Firefox for Android #1978

Closed
2 of 5 tasks
Fensterbank opened this issue Mar 7, 2018 · 5 comments · Fixed by #2007
Closed
2 of 5 tasks

Scaling options is ignored in Firefox for Android #1978

Fensterbank opened this issue Mar 7, 2018 · 5 comments · Fixed by #2007

Comments

@Fensterbank
Copy link
Contributor

Type of issue

  • Bug report
  • Feature request

Uploader type

  • Traditional
  • S3
  • Azure
Bug Report

Fine Uploader version

5.13.0

Browsers where the bug is reproducible

Firefox for Android

Operating systems where the bug is reproducible

Android

Exact steps required to reproduce the issue

  1. Add scaling options
  2. Select and upload image

All relevant Fine Uploader-related code that you have written

      ...
      scaling: {
        sendOriginal: false,
        sizes: [
          {
            maxSize: 3072
          }
        ],
      },
      ...

Detailed explanation of the problem

Using the scaling option in Firefox for Android doesn't seem to have any effect.
The library works, but the picture becomes uploaded in full size.

@rnicholus
Copy link
Member

Most likely due to lack of support. See https://docs.fineuploader.com/branch/master/browser-support.html for details. I believe Fine Uploader uses feature testing to determine if scaling is supported, and it apparently is not for your browser/OS environment.

@Fensterbank
Copy link
Contributor Author

Fensterbank commented Mar 7, 2018

Sorry, but this is not true. Firefox for Android is a modern browser for mobile devices and supports most features.

This line should check if it is an Android stock browser but instead it checks if it is not Chrome for Android.
That's a bug since there are more mobile browser out there than Chrome for Android.

Here is the problem:
supportsUploadingBlobs = supportsAjaxFileUploading && !qq.androidStock();

Since qq.androidStock() returns true on Firefox for Android FineUploader thinks that this browser doesn't support blobs.

@rnicholus
Copy link
Member

Probably in there due to this issue: #1146. If you can suggest a change that will not regress the code as described in the above case please do open a PR and i'll be happy to review.

@Fensterbank
Copy link
Contributor Author

The issue you mentioned is about features of old stock browsers. We shouldn't care about them.
I checked this site and it seems that Firefox for Android is the only browser on Android, which doesn't have "Chrome" in it's user agent.

So a working solution without messing other things up would be to modify qq.androidStock() and add to check for the "Firefox" string.

I will check and try to confirm the scaling functionability in Firefox for Android. But since it uses Gecko, I'm pretty sure it works as good as in Chrome.
While I validate and prepare a PR you are free to reopen the issue. :)

@rnicholus
Copy link
Member

I guess we could say the same thing about Firefox on Android, as market share there is almost nonexistent. Still I will consider a well tested PR that targets only browsers with proper and non- buggy support for scaling

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants