3

Displaying external Dropbox images. The solution if your database contain many pictures to keep the database size small.

Pictures say more than words...

 

Steven

24 replies

null
    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Thank you!

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    To center photo:

    let k := substring('Shared URL', 0, length('Shared URL') - 1) + "1";
    let c := "'display: block; margin-left: auto; margin-right: auto;'";
    html("<img width=auto height=99% align=middle style=" + c + " src=" + k + ">")

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Thank you Dean ! 

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Now I am trying to figure out the smallest number of clicks required to get a dropbox shared file URL. On Windows it seems like the fastest route is to first open the dropbox folder using Windows Explorer and then right-click a file.

    • Choices_Software_Dean
    • 4 yrs ago
    • Reported - view

    Or is there a way to bring up a open file dialog from within Ninox, then right-click the file and copy its shared URL?

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Not that i'm aware of.

    • OccasionallyGirly
    • 4 yrs ago
    • Reported - view

    Fantastic, thanks for the inspiration! It's been on my "list of things to do later" to find a way to link to external pics.

     

    In my case, I'll be linking to my images on various public websites so I created a separate field where I paste the image address. (And I guess since I'm not using Dropbox, I don't have to use the "let k" thing...)

     

    This is going to save me so much time and reduce my database size. Thanks again!

     

    Screen Shot 2020-08-16 at 5.53.52 PM

    • OccasionallyGirly
    • 4 yrs ago
    • Reported - view

    @RoSoft_Steven Rooryck @Choices Software - Dean Westover: So... I just found a potential downside solution to this, at least for my use. Maybe you can help?

     

    This solution works great when I'm in a form, but the images don't show up in the table views.

     

    Am I doing something wrong, or is this a limitation? If the latter, do you have other tricks up your sleeves that could allow me to see images in the table views, short of adding pics to the database?

     

    Thank you in advance! :-)

     

    Screen Shot 2020-08-17 at 1.05.53 PM

    • English Noil
    • Antonio_Toledano_Reyes
    • 4 yrs ago
    • Reported - view

    Hi, it works but, i tried with a link from google drive and fail, this is the example link https://drive.google.com/file/d/12eIeQ8cPwWZS2XK3gjiqs1dAQXfG-IhX/view?usp=sharing

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    Hi Antonio,

    See screenshot below :

     

    I hope I was allowed to share the image....

     

    Steven

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    formula : (to copy/paste)

    let strt := index('Shared URL Google One drive :', "d/") + 2;
    let nd := index('Shared URL Google One drive :', "/view");
    let k := "https://drive.google.com/uc?export=view&id=" + substring('Shared URL Google One drive :', strt, nd);
    let c := "'display: block; margin-left: auto; margin-right: auto;'";
    html("<img width=auto height=99% align=middle style=" + c + " src=" + k + ">")

    Steven.

    • English Noil
    • Antonio_Toledano_Reyes
    • 4 yrs ago
    • Reported - view

    Hi, thanks, I haven't realized you already answer, but I'm getting this error, and i don't know if it's me or what, but can't get this to work, and the display image it's fine btw that's me ¡¡

     

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    'Shared URL Google One drive :'
    is the name of the textfield containing your URL. You should change it to the name of your text-field's name.

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    (The ":" is missing)

    • English Noil
    • Antonio_Toledano_Reyes
    • 4 yrs ago
    • Reported - view

    missign where ? and yes I know about de textfield i even change the name to the example you give me to see if that was the problem but no

    • Ninox partner
    • RoSoft_Steven.1
    • 4 yrs ago
    • Reported - view

    The fieldname is missing the ":" 

    • English Noil
    • Antonio_Toledano_Reyes
    • 4 yrs ago
    • Reported - view

    OMG i see it now, Works great , thank a lot ¡¡¡

    • Ppc
    • titanium_fish
    • 3 yrs ago
    • Reported - view

    can we do this with PDF  as well or only Images?

    • Consultant and developer
    • Javier
    • 2 yrs ago
    • Reported - view

    Hi there.

    I've tried the above formula... and it worked once! but now, the image is not displayed anymore! Any ideas/clues? My formula is this:

     

    let strt := index(Filename, "d/") + 2;
    let nd := index(Filename, "/view");
    let k := "https://drive.google.com/uc?export=view&id=" + substring(Filename, strt, nd);
    let c := "'display: block; margin-left: auto; margin-right: auto;'";
    if Filename then
        html("<img width=auto height=99% align=middle style=" + c + " src=" + k + ">")
    else
        html("")
    end
    

    Where "Filename" is the field where I store the image url.

    • Consultant and developer
    • Javier
    • 2 yrs ago
    • Reported - view

    Interestingly, the images DO APPEAR correctly using Ninox app on my iPad, but not working on the app version for Mac. So, clearly a bug. Hope the Ninox team reads these forums

    • Consultant and developer
    • Javier
    • 2 yrs ago
    • Reported - view

    And now its working! (can't understand anything)

    • ahansonuk
    • 3 mths ago
    • Reported - view

    Hi all,

    I have tried using the above script in a formula but without any success when using Google drive, is there any way to adapt the script to work with links to Dropbox?

    The script Westy provided works perfectly with Dropbox links but not with Google Drive for me unfortunately. 
    I do have an issue where the files display in form view but neither Cards or List views using this script. 

      • cyan_silver
      • 1 mth ago
      • Reported - view

       

      我也想知道如何解決這個問題
    • cyan_silver
    • 1 mth ago
    • Reported - view

    I also want to know how to solve this problem, and I also want to know if I can let NINOX automatically upload it to the cloud space after taking pictures, and then delete the files originally placed in NINOX. How do you deal with databases with many pictures?

Content aside

  • 3 Likes
  • 1 mth agoLast active
  • 24Replies
  • 4107Views
  • 4 Following