Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

Storing picture being displayed on screen (through URL)

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 ?

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

Storing picture being displayed on screen (through URL)

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/...

Shawn
Posts: 0
Joined: Sat Jun 21, 2014 11:13 pm

Storing picture being displayed on screen (through URL)

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

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

Storing picture being displayed on screen (through URL)

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

Return to “Issues”