Vince
Posts: 0
Joined: Thu Apr 09, 2015 5:00 pm

Need help uploading graphic to collection

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

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

Need help uploading graphic to collection

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.

Vince
Posts: 0
Joined: Thu Apr 09, 2015 5:00 pm

Need help uploading graphic to collection

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

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

Need help uploading graphic to collection

Vince -

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

Vince
Posts: 0
Joined: Thu Apr 09, 2015 5:00 pm

Need help uploading graphic to collection

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

Vince
Posts: 0
Joined: Thu Apr 09, 2015 5:00 pm

Need help uploading graphic to collection

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Need help uploading graphic to collection

Hello Vincent,

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

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

Need help uploading graphic to collection

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.

Vince
Posts: 0
Joined: Thu Apr 09, 2015 5:00 pm

Need help uploading graphic to collection

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Need help uploading graphic to collection

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.

Return to “Issues”