Hello all,
I'm trying to figure out why I'm having issues with Files (saved in Salesforce) showing up within our Community. I can link PDFs just fine when tagging the HTML to open in the same or new tab, but I'm trying to have an image serve as a clickable button to proceed to one of our pages and the link keeps coming up as broken. I've gone ahead and made Public Links for all the images and PDFs in Salesforce to reference in my code.
**I'll preface by saying I'm by no means a programmer and have fairly basic knowledge of HTML coding.
Here is the code I'm using:
<a href="CopyrightDisclaimerPageURL" target="_self"> <img alt="School Program Cover" src="FileName" width="200" height="200" style="border:3px solid black;" hspace="10"> </a>
Here is the end product with the image not appearing:
Any assistance would be greatly appreciated!
@Matt Magnani the above URL you provided:
Is not a URL for a content asset download. This looks like the URL we would use to preview a file, as it's the SVG rendition.
You can get your organization Id by going to setup > company info and it's on that page starting with 00D
Can you please try this test:
In LEX, go to the Files tab > asset library > create new asset > give it an api name and remember this name > check the box to make the asset available to guest users (i.e. public).
Also, while on the Files tab, please copy the URL as this will contain your org's domain (including the mydomain name)
Once this is done and the asset is created, in a new window can you try accessing the asset with this url format:
https://<my_domain>.my.salesforce.com/file-asset/<asset_name>?oid=<organization_Id>
In this example, asset_name is the API name used while creating the asset (there won't be spaces in it). The orgId is found as mentioned above, and the org domain is what you would have copied from the Files tab.