Discussions

 View Only
  • 1.  Embed image from local file

    Posted 08-11-2019 17:59
    I would like to embed multiple images in a form via fields. The image source needs to be from my computer not a url.
    My app test is a db of campgrounds with pictures. when I bring up the record I want the pictures displayed along with the rest of the fields like campground name, address etc.
    I am experienced with QB but can't figure this one out.


  • 2.  RE: Embed image from local file

    Posted 08-11-2019 20:07
    Ed,
    The pack rat I am, I have saved this Tip. I suspect it was posted by a Quick Base staffer in a Knowledge Base article.

    See if there are enough clues here to create a solution and then post back with your victorious formula.

    Note the Bowser issues mentioned.

    ���������������������������-

    How do I create a hyperlink or URL field that opens a file on my internal network?

    QuickBase lets you create URL fields that link to any location you want. You can link to any file on the Web or to a file on your organization's internal (local) network. You link to a local file using one of two field types:

    * Regular URL field. If paths to each document will be very different, create a regular URL field that will be completed by users as they add each record.

    * Formula - URL field. If the path to the server will remain the same and only the name of the file changes with each record, create a Formula - URL field. When you do so, QuickBase generates the URL automatically based on the file name a user enters.

    NOTE: Links to local files work only in Internet Explorer. These links do NOT work in Firefox due to a security setting.

    To link from a regular URL field:

    Create a URL type field (to learn how, read: https://www.quickbase.com/help/adding...) and add it to your table's form(s). Whenever you add or edit a record, type the path to the document in the URL field.

    For example, say the path to your document is:

    \\ny01\marketing\docs\pamphlet.pdf

    Just enter that exact path in the URL field and click Save. When the record's in display mode, that path appears as a link. QuickBase automatically prepends the word "file:" to the URL, which designates the hyperlink as one that opens a destination file on the local network.

    To link from a Formula - URL field:

    If you store all your documents in the same place, you can save your users some work by using a Formula - URL field instead of a regular URL field. You enter the full folder (or directory) path in the field's properties and then ask your users to enter only the document name. QuickBase will put it all together and generate a proper hyperlink.

    First, create a field to hold the file names and add it to your form(s). This can be a text type field. You and your users will use this field to enter the full name of the file you want to link to. When you enter the file name, you must include the file extension (.pdf, .doc, .html and so on) within the name in order for the URL to be complete.

    Next, create a Formula - URL type field. After you create the field, click its name to open its properties page. Within the formula box, enter the formula that tells QuickBase how to compose the URL to link to local files.

    For example, say the path to the folder containing your documents is:

    \\ny01\marketing\docs\

    and users will enter filenames in a field called "File Name"

    Your formula should look like this:

    "file:\\\\ny01\\marketing\\docs\\" & [File Name]

    This formula tells QuickBase to take the text that appears between the double quotes (the start of your URL) and add whatever text appears in the File Name field to the end. But, where did those extra backslashes come from? The backslash is a special character in the QuickBase formula language. It tells QuickBase that the character following the backslash should be taken for its true value and not its value in the QuickBase formula language. For example, say you wanted your formula text field to actually include a double-quote character (which, in the formula language delimits the text of a literal). To do so, you'd precede it with a backslash, as in: "The \" character is special." So, for each backslash that you want to actually appear in your URL, you must precede it with another backslash. In other words, double the backslashes--for each single backslash, type two.
    Save changes to the field and test it. When you add a record, enter the file name and save. QuickBase then generates a URL that links to that file on your local network.

    Read more about:

    Creating fields: https://www.quickbase.com/help/adding...
    QuickBase Formulas: https://www.quickbase.com/help/using_...

    ~~~~~~~~~~~~~~~~~~~~~~

    Two options for Chrome:

    Enable local file links Extension
    https://chrome.google.com/webstore/de......

    Invoke Chrome with command line switch
    chrome.exe --allow-file-access-from-files


  • 3.  RE: Embed image from local file

    Posted 08-11-2019 20:09
    See also https://community.quickbase.com/quick... which says it may no longer be possible.


  • 4.  RE: Embed image from local file

    Posted 08-11-2019 20:12
    And this post says it�s possible from internal PCs.

    https://community.quickbase.com/quick...


  • 5.  RE: Embed image from local file

    Posted 08-12-2019 20:14
    OK. I used a file attachment in a form for the jpg's. Works fine for what I am doing.
    However......
    I have a form that displays jpg's.
    Everything is working with the exception of a couple of the jpg's are rotated. If I bring them up in a viewer the display correctly but in QB they are rotated 45 degrees.
    I know I could bring them up in a viewer and rotate them 45 degrees so they're good in QB but wrong in my viewer.
    How do I handle this?



  • 6.  RE: Embed image from local file

    Posted 08-12-2019 20:20
    I believe that is a known issue that Quick Base  is not able to detect the rotation of the image.


  • 7.  RE: Embed image from local file

    Posted 08-12-2019 20:40
    OK thanks Mark. I'll check in with them.


  • 8.  RE: Embed image from local file

    Posted 08-12-2019 21:19
    QB said they can't do anything about it.
    I rotated the images in question so they were all horizontal. That worked but a clear get around and a pain if you have lots of images.
    Thanks for your help.


  • 9.  RE: Embed image from local file

    Posted 08-11-2019 20:25
    Great. I'll go for it!!