Love this module, when the email is sent, I have the images attached along with links in the bottom of the email to the file location on my VPS Server.

I'm now using the Web-To-Lead module to send the webform data to my Salesforce Lead form. All of the fields in my webform populate the lead fine except the images that users are uploading in the WebForm using this module.

I would just like to populate the field in Saleforce with the image(s) URLs like I see in the email, but instead, I'm getting an image ID number (i.e. 1441, 1442, 1443). Does it have something to do with the Multiple file fieldtype? (see attached webform fieldtype) This is what the field looks like in Salesforce (see attached salesforce field).

Any idea how these numbers relate the the URL of the stored file?

Regards,

John

CommentFileSizeAuthor
webform-field.png11.04 KBsuncorjohn
salesforce-field.png5.91 KBsuncorjohn

Comments

suncorjohn created an issue. See original summary.

suncorjohn’s picture

anyone??

chalk’s picture

Hi, @suncorjohn.

If you know a File ID - you can obtain an absolute File URL with next code:

<?php
$file = file_load($fid);
$uri = $file->uri;

// Absolute URL.
$url = file_create_url($uri);
?>
suncorjohn’s picture

Chalk,

Where does this code go?

suncorjohn’s picture

Also, don't know the file ID, it's automatically generated whenever someone uploads images in the webform, correct?

suncorjohn’s picture

Chalk,

Did you get a chance to looks at my questions? Would really like to resolve this.

Thanks,

John

chalk’s picture

@suncorjohn,

I see your questions, but the integration with Saleforce is not a critical issue for this module. I think you need somebody who is good in custom code development - he will help you. Unfortunately, I have no time to set up the Saleforce and research the problem.

suncorjohn’s picture

Thank you Chalk,

Would the code changes have to be made within the module? My main point is that when images are attached to the webform and the webform sends an email, the image URLs are generated and work fine. Just want to replicate that code for send the image URLs to Salesforce.

Thanks again,

John

chalk’s picture

Are images from a single File webform component displayed good in Salesforce?
I don't know where a code should be updated: if it possible - try to override in a custom module, if not - you have to patch a code of this module. Webform stores ID of each image (see file_managed table).

suncorjohn’s picture

Chalk,

No, I tried a single image but it did not work.
So, the WebForm module stores the ID and not this module?

chalk’s picture

Yes, this module doesn't define a table in a database. All data is processed by the Webform module.

suncorjohn’s picture

Thanks Chalk

suncorjohn’s picture

Status: Active » Closed (works as designed)