Zoho Deluge: Get Image Uploaded in Creator Form

So this is an article to document the methods I use to get an image uploaded in a form to display in a report or on another page.

There might be different articles out there and discussion forums that do cover this but it takes me so long to find the solution with the right syntax.

So I'm going to start with 1 method and then update this article with other methods.

Method #1: Display and access without login
So the quickest is to have a form that has an image upload field. Create an entry with one image. Then...
  1. Go to Settings
  2. Publish
  3. Publish Component > Select your report
  4. Copy the embed code it pops up with to your clipboard
  5. Paste this into a browser
  6. Right-click on the image you want and inspect the element, this will have the SRC which is the publicly accessible version that you want.
Now you can use that value in your HTML.

Method #2: Using Deluge
Assuming that I have a form called "MyImages" and an image upload field that has the field link name "MyImage". There is an additional single-line text field called "Name". I have added an entry with name "Logo" and I have uploaded an image accordingly.
// change this to eu (Europe), com (US), com.cn (China), ...
v_TLD = "eu";

// my creator form
f_MyImages = MyImages[Name == "Logo"];
v_Filename = f_MyImages.MyImage.getSuffix("/image/").getPrefix("\"");

// specify publish key of published report (not the form)

// build image src
v_ImageSrc = "https://creator.zoho." + v_TLD + "/file" + zoho.appuri + "MyImages_Report/";
v_ImageSrc = v_ImageSrc + f_MyImages.ID + "/MyImage/image-download/" + v_PublishKey;
v_ImageSrc = v_ImageSrc + "?filepath=/" + v_Filename;

// yields something like https://creator.zoho.eu/file/myaccount/myapp/MyImages_Report/12345678901234567890/MyImage/image-download/AAAAABBBBBCCCCDDDDEEEFFFGGGGHHHIIIJJJKKLLLMMMNNOOOPPPQQWRRRSSTTUUVVWWXXYYZZ122345567890?filepath=/2138123687628736_MyLogo.png

Related Articles

Joes Revolver Map


Badge - Certified Zoho Creator Associate
Badge - Certified Zoho Creator Associate

Donate & Support

If you like my content, and would like to support this sharing site, feel free to donate using a method below:

Donate to Joel Lipman via PayPal

Donate to Joel Lipman with Bitcoin - Valid till 8 May 2022 3QnhmaBX7LQSRsC9hh6Je9rGQKEGNQNfPb
© 2021 Joel Lipman .com. All Rights Reserved.