Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

resize image before upload to db

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

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

resize image before upload to db

Hi Katya, thank you so much for your help!

Asif
Posts: 0
Joined: Tue Aug 13, 2013 12:56 pm

resize image before upload to db

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 .

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

resize image before upload to db

Hello! What is your Android version?

Asif
Posts: 0
Joined: Tue Aug 13, 2013 12:56 pm

resize image before upload to db

Its the samsung galaxy s4 . version 4.2.2

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

resize image before upload to db

Hi Asif,

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

Sean Kelley
Posts: 0
Joined: Thu Oct 11, 2012 2:25 pm

resize image before upload to db

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.

Tooba Atif
Posts: 0
Joined: Fri Apr 04, 2014 3:07 am

resize image before upload to db

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

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

resize image before upload to db

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

Return to “Issues”