Comments (9)
I don't think there is an issue.
Please try to open this link with your android browser: https://image-library.app/
If you still have issues, please details your android specification and which browser you use.
from ngx-image-compress.
You're correct it is working from the link you sent me, must be something in my code. I'll try adding some logging at each step to figure out the issue.
Also I wanted to know if there is a way to get the file name of the file uploaded from within the function. Because I need the file extension for storage.
from ngx-image-compress.
@aviralgoyal filename would be a good addition.
I'm adding this for fututes feature.
Meantime you can write you own "upload" function and use the this.imageCompress.compressFile
function from the library.
from ngx-image-compress.
I'm having the same issue using Ionic/Angular project, I can upload a photo from file but not from gallery nor from camera... The app you passed is working fine.
from ngx-image-compress.
@andresud I found the problem, in my case I used a mobile debugging option and when I'm using the Angular Material button, the library responds with a message, user interaction is required, or something on those lines. I removed the angular button and put a normal button, it works fine. @dfa1234 There is some kind of warning added to the library, which is behaving differently in case of an angular material type button.
There is one more enhancement that I would like to request, in the uploadAndGetImageWithMaxSize(), if you could expose the size and quality parameters to help the developer choose how much the size or quality should be reduced each time the loop runs for reducing the image size to the desired size. Right now it is set at 50%, which i feel is bit too much, I think it should be somewhere around 20% or user definable which would be ideal.
from ngx-image-compress.
@aviralgoyal indeed we could add optional quality parameter. At first this function was done for being a lot more simple to use, with minimal configuration, when, on the contrary, this.compressImage give a lot more of control. But adding a optional parameter is not a problem. Feel free to submit some PR if you have some minutes so we will not forget it. even if the PR is not 100% ready it will help
from ngx-image-compress.
@dfa1234 I will try my level best and find time, I am yet to make my first PR, so it might take me a while to read and understand, how to do this.
I tried upload a file < 1MB on https://image-library.app/
using the option Uploading, Compressing and returning with max size of 1 MegaByte.
It is giving an error as even though it is already smaller than 1mb. It is trying to reduce the file further and as it did not succeed and goes to the error handler instead of just succeeding without compressing.
from ngx-image-compress.
@aviralgoyal interesting, indeed if image is already < to 1mb the promise should resolve and not reject, we will add a PR for this, or you can submit it, it can be a good exercise for you too :)
from ngx-image-compress.
Filename available in #89
from ngx-image-compress.
Related Issues (20)
- uploadFile not resolving promise on PWA, isSafari incorrect value HOT 9
- file name when using uploadAndGetImageWithMaxSize HOT 1
- Require Angular 16? HOT 2
- Cannot compress image of 103kb to fit in 1mb HOT 5
- Compress Image with Max Size without use upload HOT 7
- ERROR Error: Uncaught (in promise): Event: {"isTrusted":true} HOT 2
- Slowdown on compress image with modified RegExp prototype
- the pop-up window opens twice
- Image turn black after Compression
- just compress and resize if width bigger than a given value HOT 1
- filter gif images HOT 2
- Get access to the File names HOT 2
- Doesn't work with version 12 of Angular HOT 6
- Expose fileToDataURL Api publicaly
- `cannot contain special characters` error in the console, sometimes happening HOT 4
- uploadFileOrReject not rejecting on Chrome on Android HOT 2
- Building a library alongside with Ivy and non-Ivy transpilation for retrocompatibility HOT 4
- File Object has to be emitted in the changeEvent like the traditional (onchange),,, to get the all file info.............. HOT 12
- Ivy update HOT 2
- generateUploadInputNative does not set the input element's Accept property to 'image/*' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-image-compress.