This breaks the methodology of embedded uploads in that embedded uploads are only supposed to be used by the asset it is embedded in. If you want many assets to be able to use an upload, you should store that upload in say the /Asset/ Directory.
However, there is a way around this, but this is based on one assumption. That embedded uploads get stored in the same directory on the live site as the asset itself. Given this, you can do the following.
However, there is a way around this, but this is based on one assumption. That embedded uploads get stored in the same directory on the live site as the asset itself. Given this, you can do the following.
fileName = list.item("the_upload")
// This will return the path and filename to the CMS where the upload is stored.
// ie. '/Myhorse/01/02/abc.gif'
liveSitePath = asset.getLink(list.item("_cmsId"))
// This will return the path and filname to the live site where the asset is stored
// With the assumption that uploads get saved in the same directory, just do a
// little string manipulation and you got it.
Comments