Referencing Externally Available Images Absolute URL with My Domain?

Question

Is there a way to reference externally available images when using my domain, such that it doesn’t reference the data center?

When I copy the url from the document itself the url still contains the data center, na13 in this case

https://mydomain--c.na13.content.force.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Background

Our org is getting moved to a different data center and I’m in the process of setting up my domain so that any absolute links won’t need to be updated again for future data center changes, and so that I can make the changes before the switch and avoid having to time the changes exactly to the completion of the migration. However, it seems like images don’t have any option for doing this? Any suggestions?

Answer

I solved this in our org by changing the URL to the following:

https://mydomain.my.salesforce.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Salesforce will automatically redirect this to:

https://mydomain--c.na13.content.force.com/servlet/servlet.ImageServer?id=015a00000030EqL&oid=00D30000000X7qS&lastMod=1392744621000

Attribution
Source : Link , Question Author : Ralph Callaway , Answer Author : Scott Fraser

Leave a Comment