Tim1219988
Posts: 0
Joined: Sat Jun 21, 2014 2:15 am

Linking images in database

Hi is it possible to upload a few images into the files DB, and then link to these images from one of my collections?

I was wanting to display an image with search result items in my app. I've read that you can use a pointer column type but it won't let me point to any files?

Cheers

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

Linking images in database

Hi Tim,

We'll need to clarify this point with our developers.

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

Linking images in database

Hi Tim.

Yes you can upload multiple files to Appery.io database.

See details how to do it here: http://devcenter.appery.io/tutorials/...

You can not link items from system Files collection to other collections.

Please use following solution for this goal:

  1. Add to your custom collection field "file" with type "string".

  2. Upload file to the system "Files" collection.

  3. Get "File Name" field and insert it in "file" field from your custom collection(that's you need to link this file).

  4. Open your custom collection mapping and link "file" field to image.asset and click "Add JS" on this mapping. Fill it with following code:

    http://prntscr.com/3ula5f/direct

    http://prntscr.com/3ulabg/direct

    pre

    return "https://appery.io/bksrv/rest/1/admin/files/download/52fd3d06e4b0a25c11c89917/" + value;

    /pre

    Regards.

Tim1219988
Posts: 0
Joined: Sat Jun 21, 2014 2:15 am

Linking images in database

Cool that did the trick, thanks

Return to “Issues”