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

Safari/Firefox Issues #39

Open
ackushiw opened this issue Aug 13, 2016 · 3 comments
Open

Safari/Firefox Issues #39

ackushiw opened this issue Aug 13, 2016 · 3 comments

Comments

@ackushiw
Copy link

Right now working on an angular2 app. I'm using J-I-C for compression before uploading to firebase storage. It works perfectly on Chrome. On other browsers it doesn't seem to process properly.

...
this.compressedImage = jic.compress(imgTag, quality, 'jpg').src;
// on safari this.compressedImage  = "data:"

let file = dataURItoBlob(this.compressedImage);

let uploadTask = storageRef.child('images/' + newKey + fileType)
          .put(file);
...
@Isengo1989
Copy link

@ackushiw is there a fixture yet? Safari doesn´t work for me either.

@Isengo1989
Copy link

@ackushiw maybe you have the same problem like me. I wrapped the whole function call in a img.onload = function(){
compress / upload etc...
}

I don´t know why, but Chrome and IE can deal with it. FF and Safari don´t like it or are executing faster - so there is no data there to process.

@ackushiw
Copy link
Author

@Isengo1989

I didn't manage to get it working for safari/Firefox... Right now I'm
bypassing compression if compression fails. I'll have another crack at it
soon. I have an idea to wrap it in a web component

On Oct 7, 2016 09:04, "Isengo1989" [email protected] wrote:

@ackushiw https://github.com/ackushiw maybe you have the same problem
like me. I wrapped the whole function call in a img.onload = function(){
compress / upload etc...
}

I don´t know why, but Chrome and IE can deal with it. FF and Safari don´t
like it or are executing faster - so there is no data there to process.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#39 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF6kbKaBCrzJYODGslj-Yj262bk9rJIMks5qxkN6gaJpZM4JjkoX
.

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

No branches or pull requests

2 participants