Page 4 of 6

resize image before upload to db

Posted: Thu Jul 18, 2013 8:58 pm
by Kateryna Grynko

Hi Sean,

This is the changed function for loading image:
codefunction show_preview() {
$.canvasResize(file, {
width: 300,
height: 0,
crop: false,
quality: 80,
//rotate: 90,
callback: function(data, width, height) {
&#47;&#47; here you must replace $('<img>') with your Appery('image_component_name')
$('<img>')&#46;attr('src', data);
}
});
}/code


resize image before upload to db

Posted: Fri Jul 19, 2013 6:23 pm
by Sean Kelley

Hi Katya, thank you so much for your help!


resize image before upload to db

Posted: Wed Aug 14, 2013 12:51 pm
by Asif

Hi , followed your tutorial to the end. It worked fine on the desktop browser. But on the android device i am unable to upload the photo to the db . Please help urgently .


resize image before upload to db

Posted: Wed Aug 14, 2013 1:21 pm
by Maryna Brodina

Hello! What is your Android version?


resize image before upload to db

Posted: Mon Aug 19, 2013 6:08 am
by Asif

Its the samsung galaxy s4 . version 4.2.2


resize image before upload to db

Posted: Mon Aug 19, 2013 7:04 am
by Kateryna Grynko

Hi Asif,

It seems to be a device issue. On Nexus 7 with Android 4.2.2, works perfectly.
We'll continue testing.


resize image before upload to db

Posted: Mon Aug 19, 2013 11:49 am
by Sean Kelley

Hi
I just tested my app using this photo resize with my new Galaxy S4 phone and the default browser (I assume its android with world icon). I browsed for photo and also tested with camera. Both worked fine for me.


resize image before upload to db

Posted: Wed Apr 30, 2014 1:56 am
by Tooba Atif

The tutorial http://docs.appery.io/tutorials/uploa...
is not there now. Is that moved to a new link?
Please share that link..
I want to upload images from the local folder.
Thanks


resize image before upload to db

Posted: Wed Apr 30, 2014 1:59 am
by Alena Prykhodko

resize image before upload to db

Posted: Sat Jun 14, 2014 6:21 am
by EJLD

hello, I made the camera app proposed by Appery and with few more fields, it is perfect for my project. indeed a great tutorial to start with services, device functions, and DB. thk you.

only one thing is that I need to crop the photos prior to storage into the DB.
I hv checked your code here above, looked for things over the Internet among several websites. even what is supposed to bethe most simplest looks like totally too advanced for me (PHP, library, ... too many new things to deal with at once).

in fact I don't need a very sophisticated cropper. ideally redimensioning the camera frame itself would be enough. instead of square share as it is, I need a landscape rectangular shape.

anyway to change that simply ?

or anyway to help getting started with understanding the steps to make a cropper.

thk you very much in advance

Eric