Page 1 of 1

Need help uploading graphic to collection

Posted: Wed Apr 29, 2015 8:50 pm
by Vince

Greetings,

I have spent an inordinate amount of time searching through tutorials and this forum for a solution. The posts available are either out of date or do not provide a working solution.

The issue at hand is probably a requirement for a large number of users and one would expect a definitive solution to be readily available.

I want to allow a user to take a photo, (or hopefully) select a jpeg file, and upload the file to one of my collections where it can be used in a master/detail set.

Apparently all uploads must go to the Files collection and there appears to be no easy solution for transferring the file name to a specific record in a user collection.

Thus far I have tried using the upload success event to map the graphic file name and the image url to a storage variable. I then tried to create a new record in a collection and map the graphic file name or url from storage.

Unfortunately, all these attempts cause the create service to fail. I can upload a photo from the camera service to the Files collection and store the url and file name to storage variables, however I cannot update or create a collection record with a valid graphic file.

Please note I have done all the relevant photo and upload tutorials. I have searched extensively with no success. I have mapped and remapped dozens of times.

I would appreciate assistance with this issue.

Thanks,

Vince


Need help uploading graphic to collection

Posted: Thu Apr 30, 2015 4:50 pm
by Illya Stepanov

Hi Vince -

Could you please show with screenshots your update and create services implementations that are does not work for you. With mapping structure in our builder and request/response logs inside the browser developer tools.


Need help uploading graphic to collection

Posted: Thu Apr 30, 2015 6:24 pm
by Vince

Illya,

Thank you for the reply.

As I stated, I have tried to accomplish this task repeatedly over the course of many days. I have not saved the numerous failed mapping attempts.

Is it even possible to use the response image URL or file name of an uploaded camera image to populate a file column in one of my collections? Surely you can advise on the overall correct steps required to achieve my goal.

I will attempt to recreate the failed screenshots, however as I have already spent days on this my frustration level is pretty high. It would be nice to know if I am even on the right track. Perhaps there is a better method available.

Presently the only way I can place a graphic in a collection column for use in a master / detail set is to do it manually. I need to enable my users to upload a graphic file to the collection.

Aren't there any current examples or tutorials that illustrate the correct process?

Regards,

Vince


Need help uploading graphic to collection

Posted: Thu Apr 30, 2015 6:49 pm
by Illya Stepanov

Vince -

This one doesn't work either in your case:
:: https://devcenter.appery.io/documenta...


Need help uploading graphic to collection

Posted: Thu Apr 30, 2015 7:06 pm
by Vince

Update.

I attempted this again, using the cordova_file_upload service to upload a camera photo. Then using an update service I mapped the columns as shown below.

Image

This time I did manage to populate the file column, however it appears I need to parse the file name and remove all characters left of the period before the column is updated.

Image

Still not sure if this is even the best way to get this done. I would prefer uploading an existing graphic rather than using the camera service. Please advise.

Regards,

Vince


Need help uploading graphic to collection

Posted: Sat May 02, 2015 5:07 am
by Vince

Really? A link to something else that doesn't work?


Need help uploading graphic to collection

Posted: Tue May 05, 2015 9:53 am
by Evgene Karachevtsev

Hello Vincent,

We are sorry for delay, we are working on it and will get back to you with the update


Need help uploading graphic to collection

Posted: Wed May 06, 2015 2:08 am
by Yurii Orishchuk

Hi Vincent,

You on the correct way.

  1. Upload file. and get fileName(this is a automatically generated id)

  2. Use update/create service to store fileName(from 2nd step).

  3. When you need to get this file URL you can make public link in following way:

    pre

    https://api.appery.io/rest/1/db/files/[databaseID]/[fileName]

    /pre

    More info here: https://devcenter.appery.io/documenta...

    Regards.


Need help uploading graphic to collection

Posted: Thu May 07, 2015 6:19 pm
by Vince

Thank you for the update. Got it working several days ago by lengthy and repeated trial and error. But it is nice to know that the process is correct.


Need help uploading graphic to collection

Posted: Fri Apr 01, 2016 9:28 am
by Serhii Kulibaba

Hello,

Could you clarify what you have tried and what exactly does not work? Please send us screen shots of this problem/implementation so we can better understand what is happening.