Rui Song Chong
Posts: 0
Joined: Sat Jan 17, 2015 10:51 am

Assign image in files collection to a specific row in the database

Hi,

I'm able to use my app to upload image, and create rows in database, however the image uploaded is not link to the row I created.
Image

RIght now, I have a create_service and a upload service which would be invoked when I click the upload button. But in the database, the image I uploaded is not linked to the row I created. How can I link it without having to go to the database manually? Thanks!
Image

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Assign image in files collection to a specific row in the database

Hi -

To understand how to work with images in Appery.io I'm recommending to start here: http://devcenter.appery.io/documentat...

Rui Song Chong
Posts: 0
Joined: Sat Jan 17, 2015 10:51 am

Assign image in files collection to a specific row in the database

Hi,

As you can see from the image, when the user tap on the upload button, the rows should be created automatically with the file uploaded, what you suggested is how to manually link the images right? which is not what I want.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Assign image in files collection to a specific row in the database

Hi Rui,

At first on "success" event handler of "upload" service - you should save "fileName" into some storage.

Then, on "success" Event of "upload" service - you can invoke "create" service.

Also - in create service you should link "fileName" from stored in storage value to "fileName" of your file type field.

Details: http://prntscr.com/639sca/direct

Regards.

Return to “Issues”