Page 2 of 6

resize image before upload to db

Posted: Wed Jun 19, 2013 5:22 pm
by Sean Kelley

Hi
Obviously I cannot test what is happening with iOS but on the android phone, the error was:
Uncaught TypeError: Illegal constructor
dataURItoBlobUpload.js:16
reader.onload


resize image before upload to db

Posted: Wed Jun 19, 2013 5:32 pm
by Kateryna Grynko

Thank you, will be tested.


resize image before upload to db

Posted: Thu Jun 20, 2013 12:56 pm
by Maryna Brodina

Hello! We reproduced this problem, but could you also check are there any changes in your DB--Files when you upload images from each device? I mean could you test one more time this app from your devices and see if files uploaded in your DB, with what names, etc.?


resize image before upload to db

Posted: Thu Jun 20, 2013 2:15 pm
by Maryna Brodina

Hi again,

"iPhone 4 with iOS 6- using camera or browsing previews fine. Upload service completes successfully. Trying to view image is broken. An image download direct form Appery database says "Invalid image"" - in your JS asset replace code:

codefunction dataURItoBlob(dataURI) {
var binary = atob(dataURI.split(',')[1]);
var array = [];
for(var i = 0; i < binary&#46;length; i++) {
array&#46;push(binary&#46;charCodeAt(i));
}
return new Blob([new Uint8Array(array)], {type: 'image&#47;jpeg'});
}/code
with the following:
codefunction dataURItoBlob(dataURI) {
var byteString = atob(dataURI&#46;split(',')[1]);
var ab = new ArrayBuffer(byteString&#46;length);
var ia = new Uint8Array(ab);
for (var i = 0; i < byteString&#46;length; i++) {
ia = byteString&#46;charCodeAt(i);
}
return new Blob([ab], {type: 'image&#47;jpeg'});
}/code

"Android phone (android 4.1.2 with Chrome 18.0.x) -Upload button does nothing and no photo gets to database." - please try to update Chrome version.


resize image before upload to db

Posted: Thu Jun 20, 2013 8:07 pm
by Sean Kelley

Hi
I made the code change and the iPhone uploads an image. However, taking the photo with phone upright (portrait orientation) displays the image preview with the correct orientation, but saves it in the database rotated counter clockwise 90 degrees.
https://api.appery.io/rest/1/admin/fi...

(I'll be deleting this file in a bit)

I tested android phone again with chrome (without upgrade) and no change in behavior. I also tested android browser this time and it displays same behavior...that is- nothing happens when upload is clicked.

I updated chrome on android phone and now it fails in a different way. Screen says "failed to open selected file" There is no error in console log. After further testing with other camera app (not manufacturer installed) they all work ok so this new issue much be a camera specific problem

Test of android tablet still works ok and image is not rotated.

To sum up, android browser on android 4.x phone fails. iPhone image gets rotated when saved. I can live with android browser issue if I have to (although in theory it should work). The iphone issue needs a solution however. Any ideas why this might be happening? It's strange that it would preview ok but end up in database wrong.


resize image before upload to db

Posted: Fri Jun 21, 2013 7:35 pm
by Kateryna Grynko

Hi Sean,

Sorry for the delay, it's not that ease to answer your questions. The testing will take some time.


resize image before upload to db

Posted: Fri Jun 21, 2013 7:38 pm
by Sean Kelley

no problem! I appreciate you sticking with me :-)


resize image before upload to db

Posted: Tue Jun 25, 2013 10:42 am
by Anton Artyukh5836028

Hi Sean,

We are still working on it.


resize image before upload to db

Posted: Tue Jun 25, 2013 8:11 pm
by Maryna Brodina

Hello! Unfortunately no news for now... It might take up to couple of days. Someone will get back to you and update this post.


resize image before upload to db

Posted: Mon Jul 01, 2013 8:24 am
by Maryna Brodina

Hello! Sorry, could you remind app name? Is it shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?