For Zoho services only


I'm currently part of a wider delivery team at Ascent Business Solutions, recognised as a leading Zoho Premium Solutions Partner in the United Kingdom.

Ascent Business Solutions support organisations with everything from targeted technical fixes through to full Zoho CRM implementations and long-term platform adoption. Working as a team rather than a one-person consultancy allows projects to move forward consistently, with access to the right skills at each stage.

The team I manage specialises in API integrations between Zoho and third-party finance and commerce platforms such as Xero, Shopify, WooCommerce, and eBay. Much of our work involves solving integration challenges that fall outside standard documentation, supporting new ideas, new sectors, and evolving business models.

Success is measured through practical outcomes and return on investment, ranging from scaling small operations into high-turnover businesses to delivering rapid gains through online payments, automation, and streamlined digital workflows.

If you are looking for structured Zoho expertise backed by an established consultancy, you can contact Ascent Business Solutions on 0121 392 8140 (UK), email info@ascentbusiness.co.uk, or visit https://www.ascentbusiness.co.uk.
Zoho Deluge: Get Image Uploaded in Creator Form

Zoho Deluge: Get Image Uploaded in Creator Form

What?
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.

Why?
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.

How?
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.
copyraw
// 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)
v_PublishKey = "AAAAABBBBBCCCCDDDDEEEFFFGGGGHHHIIIJJJKKLLLMMMNNOOOPPPQQWRRRSSTTUUVVWWXXYYZZ122345567890";

// 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
  1.  // change this to eu (Europe), com (US), com.cn (China), ... 
  2.  v_TLD = "eu"
  3.   
  4.  // my creator form 
  5.  f_MyImages = MyImages[Name == "Logo"]
  6.  v_Filename = f_MyImages.MyImage.getSuffix("/image/").getPrefix("\"")
  7.   
  8.  // specify publish key of published report (not the form) 
  9.  v_PublishKey = "AAAAABBBBBCCCCDDDDEEEFFFGGGGHHHIIIJJJKKLLLMMMNNOOOPPPQQWRRRSSTTUUVVWWXXYYZZ122345567890"
  10.   
  11.  // build image src 
  12.  v_ImageSrc = "https://creator.zoho." + v_TLD + "/file" + zoho.appuri + "MyImages_Report/"
  13.  v_ImageSrc = v_ImageSrc + f_MyImages.ID + "/MyImage/image-download/" + v_PublishKey; 
  14.  v_ImageSrc = v_ImageSrc + "?filepath=/" + v_Filename; 
  15.   
  16.  // yields something like https://creator.zoho.eu/file/myaccount/myapp/MyImages_Report/12345678901234567890/MyImage/image-download/AAAAABBBBBCCCCDDDDEEEFFFGGGGHHHIIIJJJKKLLLMMMNNOOOPPPQQWRRRSSTTUUVVWWXXYYZZ122345567890?filepath=/2138123687628736_MyLogo.png 

Additional Note
Just as a note to do the reverse: upload an image given a URL to an image field (prerequisite: enable the field to allow Image as "Link" not just "Local Computer" or "Camera"):
Zoho Creator: Upload to Image Field - Enable Link
copyraw
for each  r_Image in m_Product.get("images")
{
    if(!isnull(r_Image.get("src")))
    {
        if(isnull(v_MainPhoto))
        {
            v_MainPhoto = "<img src='" + r_Image.get("src").getPrefix("?") + "' alt='"+r_Image.get("alt").replaceAll("'", "")+"' />";
            info v_MainPhoto;
            // yields: <img src='joels-test-image.jpg' alt='joels test image'/>
            input.Main_Photo = v_MainPhoto;
        }
    }
}
  1.  for each  r_Image in m_Product.get("images") 
  2.  { 
  3.      if(!isnull(r_Image.get("src"))) 
  4.      { 
  5.          if(isnull(v_MainPhoto)) 
  6.          { 
  7.              v_MainPhoto = "<img src='" + r_Image.get("src").getPrefix("?") + "' alt='"+r_Image.get("alt").replaceAll("'", "")+"' />"
  8.              info v_MainPhoto; 
  9.              // yields: <img src='joels-test-image.jpg' alt='joels test image'/> 
  10.              input.Main_Photo = v_MainPhoto; 
  11.          } 
  12.      } 
  13.  } 

Category: Zoho Deluge :: Article: 266

Joes Word Cloud

Accreditation

Badge - Zoho Creator Certified Developer Associate
Badge - Zoho Deluge Certified Developer
Badge - Certified Zoho CRM Developer

Donate & Support

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

Paypal:
Donate to Joel Lipman via PayPal

Bitcoin:
Donate to Joel Lipman with Bitcoin bc1qf6elrdxc968h0k673l2djc9wrpazhqtxw8qqp4

Ethereum:
Donate to Joel Lipman with Ethereum 0xb038962F3809b425D661EF5D22294Cf45E02FebF

Credit where Credit is Due:


Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.

Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.

Thank you for visiting and, as always, we hope this website was of some use to you!

Kind Regards,

Joel Lipman
www.joellipman.com