Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

Load image to image ui component

Hi,

I post a similar question yesterday, but I think it was bad understood. I use an image UI component in one of my pages. I set the image to be used in this component choosing the image from asset button. I would like to load the image in "runtime", that is, the user chooses the image and I load the image to the image UI component. I could not find the command to be used to load the image (for instance, using Appery.getImagePath("name image")) to the UI component. Could you help me?

Thanks a lot

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Load image to image ui component

Hi!

You will need to think logic of this part, the following can help http://docs.appery.io/documentation/w...

This code returns the image URL by its name, so you can use it:

preAppery.getImagePath("imagename");/pre

Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

Load image to image ui component

Hi Alena, thank you for you quick reply. I'd like to load the image to the image component in the load event of the page. So I need some hint on how to set the image path to the image component using Appery.getImagePath("imagename").That is, I need some code inside load event javascript to link the image component to the image path, so that I can set and show the image in runtime.

Thank you

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Load image to image ui component

Hi,

It should be something like this:
pre
Appery('mobileimage_2').attr('src', ' '+ Appery.getImagePath("query.png")+' ');
/pre

Where "mobileimage_2" - image component name.

Pasteur Miranda
Posts: 0
Joined: Thu Aug 01, 2013 2:59 am

Load image to image ui component

Thank you Igor, your hint was very helpful!

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Load image to image ui component

Hello, I have a related question.
I'm creating a mobile app which will initially download and store all data locally in sqlite database.

I'm unsure WHERE in the file system I need to store MEDIA files (ie, photos, video) so that my mobile app can access them.

IE, if I have a photo, does this photo need to be stored in a specific folder so that Appery can find it?
Appery.getImagePath("photo1.jpg");

Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Load image to image ui component

You could store the photos in the app. The videos you would need to host on the Internet and link in your app.

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Load image to image ui component

Thanks for quick reply.

Sorry, I do not understand, where exactly in the file system do I put them to 'store the photos in the app'?

Why can I not store videos locally?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Load image to image ui component

You can upload images via the Image component, http://docs.appery.io/documentation/u...

There is currently no option to upload a video into the app. One of the reason is that the app will become very big very fast. It's best to host the images in the cloud and link to them.

Helen
Posts: 0
Joined: Wed Aug 28, 2013 8:35 pm

Load image to image ui component

Hi again,
My previous question:
Sorry, I do not understand, where exactly in the file system do I put them to 'store the photos in the app'?

I'm referring to where to store photos for dynamically built pages.. pulling detail info based on current ID.
(As opposed to building a static page, placing an image, and setting the path.)

Thanks!

Return to “Issues”