Insert of links to media items in the TinyMCE v3 wysiwyg
umbraco v 4.0.2.1
ASP.Net 3.5 sp1
I am curious as to whether or not it is possible to have something similar to the locallink for linking to website pages, for media items. I have a client with a pretty large site with numerous page linking to documents loaded in the media section, however, they don't enjoy having to update all the links on the page whenever they upload a new file associated with the media item.
It seems to be the way that umbraco works when inserting links to media items that it just inserts the static link with the path of the document, but when a media item is changed so that the file pointed to is different, it doesnt update the static links in content and all those links become broken (well depending upon how you update the media item, whether or not you remove the first, otherwise those links will still work because those files are still on the server).
My inital solution was to get the client to update media items, with documents with the same name as the current document associated with the media item. However, I have encountered that there are some caching issues when doing this, if I access that page and click on a link on the page and load the document, and update the umbraco media item with a file of the same name, try to access the page again by clicking on the link it loads the old document. If I think clear the cache on my browser it will pickup the correct document. Unfortunately, I am not able to force a user to clear their cache? I dont suppose that there is an option in umbraco that might prevent documents from being cached? I suspect not, but figured I would ask anyway.
I have thought about creating a macro that accepts a mediaId and would link dynamically on render so that it displays the current link loaded for the particular media item. However, have you ever tried to insert a macro into a body of a paragraph using the insert/edit button, it seems to mess with the formating of the page, if not lose some of the content after the point of the insert. Althogh I was able to get it all to work from the html view of the page, by moving around the macro div in the content so that it would work, however, the client html literate so that really isnt an option to proceed with.
Another idea I've been exploring was to expand upon the core of umbraco so that I could have my on insert, however, with the client wanting regular version upgrades, I do not really want to have to redo all the work to get this to work from one version to the next.
Hmm, a pretty long read, I just hope that it makes sense, and that someone can confirm you thoughts about caching? or perhaps suggest a possible solution that I could try.
It doesnt appear as though the meta tags have made much of a difference, it seems it still caches the older version of the file, I have to delete browser history for the new file to be picked up. I dont suppose instead of this being a result of html meta tag, but rather something that umbraco itself is doing to cach content?
Insert of links to media items in the TinyMCE v3 wysiwyg
umbraco v 4.0.2.1
ASP.Net 3.5 sp1
I am curious as to whether or not it is possible to have something similar to the locallink for linking to website pages, for media items. I have a client with a pretty large site with numerous page linking to documents loaded in the media section, however, they don't enjoy having to update all the links on the page whenever they upload a new file associated with the media item.
It seems to be the way that umbraco works when inserting links to media items that it just inserts the static link with the path of the document, but when a media item is changed so that the file pointed to is different, it doesnt update the static links in content and all those links become broken (well depending upon how you update the media item, whether or not you remove the first, otherwise those links will still work because those files are still on the server).
My inital solution was to get the client to update media items, with documents with the same name as the current document associated with the media item. However, I have encountered that there are some caching issues when doing this, if I access that page and click on a link on the page and load the document, and update the umbraco media item with a file of the same name, try to access the page again by clicking on the link it loads the old document. If I think clear the cache on my browser it will pickup the correct document. Unfortunately, I am not able to force a user to clear their cache? I dont suppose that there is an option in umbraco that might prevent documents from being cached? I suspect not, but figured I would ask anyway.
I have thought about creating a macro that accepts a mediaId and would link dynamically on render so that it displays the current link loaded for the particular media item. However, have you ever tried to insert a macro into a body of a paragraph using the insert/edit button, it seems to mess with the formating of the page, if not lose some of the content after the point of the insert. Althogh I was able to get it all to work from the html view of the page, by moving around the macro div in the content so that it would work, however, the client html literate so that really isnt an option to proceed with.
Another idea I've been exploring was to expand upon the core of umbraco so that I could have my on insert, however, with the client wanting regular version upgrades, I do not really want to have to redo all the work to get this to work from one version to the next.
Hmm, a pretty long read, I just hope that it makes sense, and that someone can confirm you thoughts about caching? or perhaps suggest a possible solution that I could try.
Thank you for the reply, I currently have the following meta tags loaded into my html templates,
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="cache-control" content="must-revalidate" />
<meta http-equiv="cache-control" content="proxy-revalidate" />
Hmm, I have done some digging and it looks as though there are other meta tags that I might try for caching control.
<meta http-equiv="Expires" content="0" />
Does this just mean that it sets the Expiry time for content loaded off the site to be immediate?
It doesnt appear as though the meta tags have made much of a difference, it seems it still caches the older version of the file, I have to delete browser history for the new file to be picked up. I dont suppose instead of this being a result of html meta tag, but rather something that umbraco itself is doing to cach content?
Aaron,
Did you find a solution to this problem?
I'm having the same issue, cant really update the links no more.
All help welcome!
: )
is working on a reply...