Mehmet Edebali Şener
Posts: 0
Joined: Thu May 30, 2013 7:33 pm

Uploading files to appery DB tutorial problem

No this one is diffrent project for uploading images. This is something like admin panel. The other one (on the link) is customer project.

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

Uploading files to appery DB tutorial problem

Mehmet,

Could you please show both?

Mehmet Edebali Şener
Posts: 0
Joined: Thu May 30, 2013 7:33 pm

Uploading files to appery DB tutorial problem

Hi again,

I share both of projects with " a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a"

TermLoad is admin application. You can send data or images to database.
User Name : appery
password: 12341234
After that you have to choose “Pack", then Any of the “tr”, “en”, “zh” buttons. Finally you can choose image with “Select Image" button. When you choose image on desktop it preview image however if you can apk export it does not work on phone(Android version 4.2.1)

SureTerms is customer application. You have some packs of words with image, description etc. Every packs and words have an image. I want to download these images to mobile device file system. If file had already been downloaded to the phone, I want to display it from local file system. Download part is working but I have a problem about displaying downloaded image. This project is about to finish except download image part. SureTerms project just works on mobile devices. Because LocalFileSystem defined on just Phonegap.

When you click MyPacks button this button navigate to “listPackagesPage”. “QueryPackages" service gets packs information from server. “package_picture” field is referencing image file on sever. On response part “package_picture” is assigned to invisible label. These reference has javascript which check file existence on local storage download and display these image. Download part works however whatever file exist or not image not displayed on screen. By the way images downloaded to “SureTerms” folder on your sdcard or internal storage (which one has higher priority ).

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

Uploading files to appery DB tutorial problem

Hello! Thank you for sharing! We'll check, but testing might take some time.

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

Uploading files to appery DB tutorial problem

Hello!

To make Image displayed it should be mapped on Response tab to Asset property Image component (one, where you want it to be shown).
I can not see it's bound in your projects
Please check this carefully https://getsatisfaction.com/apperyio/....

Mehmet Edebali Şener
Posts: 0
Joined: Thu May 30, 2013 7:33 pm

Uploading files to appery DB tutorial problem

Hi, for which project is this answer?

"SureTerms" project gets just image name from database service. Then calculates local storage fileUrl and set image component source.

"TermLoad" project get image source from file dialog then reading this image with reader as DataURL and setting the component source.

Both of them getting images from local storage. So there isn't any real connection between image component and services.

Could you clarify your answer please?

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

Uploading files to appery DB tutorial problem

Hello!
1) In app TermLoad try to add alerts in previewFile function to see what file.type and e.target.result are equal to. Perhaps there are some errors in file on this Android versions (incorrect file type or missing data in e.target.result). Please check and do necessary changes.
2) Regarding SureTerms app. It was working before, but now it doesn't? or it didn't work at all? What Android version did you use to test before and what version you use now? As we can see code in mapping to imageName Input in QueryPackages service on listPackagesPage is commented. What code supposed to be there? Please post it or do not comment necessary code so we can test it. Please let us know when it's done.

Return to “Issues”