Page 1 of 1

Upload and retrieve image concerns

Posted: Thu May 14, 2020 4:56 pm
by EddieLee
Hi all,

Currently exploring what are the ways I can upload or retrieve an image for my app. The app is set to be developed on android and iOS platforms and I could really use some advice/help.

1. I tried uploading it and retrieving it from my database, however as the images increase, it makes my app very lag (15 secs taken to display 4 images) that is retrieved from the database. Is there any way to speed things up?

2. For android, From what I know I can use a file path to store the images used from my app and also retrieve the images from there. How do I go on about coding it?

3. For iOS, is there a file path like I can use in android? If yes what is it?

Just looking for the best way to upload and retrieve images without lagging and slowing my app down drastically. Any input and help is appreciated.

Thanks!

Re: Upload and retrieve image concerns

Posted: Thu May 14, 2020 5:17 pm
by Klaus
Hi Eddie,
EddieLee wrote:
Thu May 14, 2020 4:56 pm
...
2. For android, From what I know I can use a file path to store the images used from my app and also retrieve the images from there. How do I go on about coding it?
3. For iOS, is there a file path like I can use in android? If yes what is it?
what is valid for iOS is also valid for Android!

So whatever you add to your standalone via the "Copy files" tab in the "Standalone Application Settings" can be found in your runtime in -> specialfolderpath("resources") on ANY platform!

If you download images you will have to store them in -> specialfolderpath("documents") on iOS and Android because we have write permissions there. Is that what you mean?


Best

Klaus

Re: Upload and retrieve image concerns

Posted: Fri May 15, 2020 1:36 pm
by EddieLee
Klaus wrote:
Thu May 14, 2020 5:17 pm
Hi Eddie
what is valid for iOS is also valid for Android!

So whatever you add to your standalone via the "Copy files" tab in the "Standalone Application Settings" can be found in your runtime in -> specialfolderpath("resources") on ANY platform!

If you download images you will have to store them in -> specialfolderpath("documents") on iOS and Android because we have write permissions there. Is that what you mean?


Best

Klaus
Hi Klaus,

Yes that’s what I meant. So I have to copy the images to specialfolderpath(“documents”) first before I can retrieve it from there? And also for uploading image, the image file would have to be saved to apecialfolderpath(“documents”)? What about the database issue I mentioned in point 1? Any idea why? Thanks for telling me it’s the same for IOS too!

Thanks!

Re: Upload and retrieve image concerns

Posted: Fri May 15, 2020 2:02 pm
by Klaus
Hi Eddie,
So I have to copy the images to specialfolderpath(“documents”) first before I can retrieve it from there?
no, just use them from RESOURES!
I meant we cannot SAVE anything in that folder, and for databases even OPENING them is considered SAVING/EDITING.
And also for uploading image, the image file would have to be saved to apecialfolderpath(“documents”)?
No, you can upload anything from the RESOURCES folder, but just not write to that folder (downloading images etc. to that folder is TABOO!)
What about the database issue I mentioned in point 1?
Well depends on the size of the images. What did you script so far?


Best

Klaus

P.S.
Will answer your mail a little later today...