Page 1 of 1

Storing picture being displayed on screen (through URL)

Posted: Fri Jul 25, 2014 11:34 am
by Shawn

My App allows an user to enter an image URL and then displays it on the screen by making an Image components asset point to the URL.

I would like to take that image from the screen and store it in the DB. Not the URL but the actual image data. I don't mind storing as a photo buffer (similar to how its done from the camera).

Is there anyway I can grab the image being displayed on screen ?


Storing picture being displayed on screen (through URL)

Posted: Fri Jul 25, 2014 12:59 pm
by Maryna Brodina

Hello!

Here is how to read file from url http://devcenter.appery.io/documentat... and here is how to save it to the DB http://devcenter.appery.io/tutorials/...


Storing picture being displayed on screen (through URL)

Posted: Sat Jul 26, 2014 2:23 pm
by Shawn

Hi Maryna

Ok I created a new REST service and added the image url as its path and
seem to be getting the raw image (screen 1).

Do I need to provide any request or response parameters ?

How do I store this in a variable to process it further ?

Image Image


Storing picture being displayed on screen (through URL)

Posted: Mon Jul 28, 2014 3:22 pm
by Maryna Brodina

Hello!

Please try reading file with ajax:

pre$.ajax({
type: "GET",
url: "path/to/file",
success: function(text) {
// text is the file text
},
error: function() {
// An error occurred
}
});/pre