I have several documents that get updated on a regular basis. Is there a way to upload to file management so they a) overwrite the previous version and b) keep the existing URL on a file? I don't want to have to update the HTML on the multiple pages in which the document has been linked. Or is there a way to shorten up the url? For example, https://www.ihpmi.org/Por...3-165145-647 is a current URL for one of my documents on ihpmi.org website. I'm not sure how to find what version of dnn I have. I'm the editing side of the website, not the developer. Thanks for any tips to make editing process easier.
The current version of DNN is displayed on the Host, Host Settings page for older versions of DNN (those which have the Control Bar and not the Persona Bar. If the files are uploaded manually, then you'll be asked if you want to replace the file. If you are uploading with FTP or the like, you should have similar choices. Provided that the file name doesn't change, neither will the URL, provided that the URL doesn't include FileId but does use the file name. If the file version information is included in the HTML, you will need to edit that out. If you have a version of DNN 9, see if the version is displayed if you mouse over the DNN logo at the top of the Persona Bar. If this doesn't happen, you have one of the earlier DNN 9 releases.In that case, go to the Settings, Servers page and read it there.
Posted By Joe Craig on 16 Feb 2021 07:17 PM The current version of DNN is displayed on the Host, Host Settings page for older versions of DNN (those which have the Control Bar and not the Persona Bar. If the files are uploaded manually, then you'll be asked if you want to replace the file. If you are uploading with FTP or the like, you should have similar choices. Provided that the file name doesn't change, neither will the URL, provided that the URL doesn't include FileId but does use the file name. If the file version information is included in the HTML, you will need to edit that out. If you have a version of DNN 9, see if the version is displayed if you mouse over the DNN logo at the top of the Persona Bar. If this doesn't happen, you have one of the earlier DNN 9 releases.In that case, go to the Settings, Servers page and read it there.
I think Lnoyer means the version part of the url. AFAIK you cannot remove that, but DNN should also resolve the file if the version is an older one..
Thank you for your reply. So in my example, https://www.ihpmi.org/Por...019-06-03-165145-647 as long as the file name of IHPFast-UrgentCareCentersEngSPAN stays the same each time, I will be asked to replace the file? I believe I have experienced that before. And the ver=2019-06-165145-647 you are suggesting that I can remove from the HTML even though it's part of the URL? I'll have to try that. What is the FileID? I'm not sure if my URL contains that.
Thanks again for the guidance.
I think that in general you should not do this. The general guideline is that a resource at a specific URL should remain unchanged. If you change the resource then it shoudl get a new url. That is the idea behind the ver= parameter. It's designed to give the file a URL that changes if the file is modified.
DNN has code in it to automatically generate that ver= parameter as the outgoing html is generated.
How do you link to the file? If it's a link that was copy/pasted then it will not get the automatically generated ver parameter. So it's better if we can find a way to get the link auto generated for you.
For reference - https://blog.httpwatch.co...-http-caching/
I'm using the "Get URL" when I right click on the Uploaded File in File Management. I guess I would consider it to be auto-generated. Then on my page HTML, I copy and paste that URL to link to that file.
I think what I'm determining is that I just need to update the URL on everypage that I have the file linked. I'm not doing massive updates so a few times a month I can upload the new file (which I will use the same file naming mechanism) and then update the URL in the multiple places. I just worry that I'll forget a spot and an outdated document will be accessible.
Thank you.
If that approach generates the ver= part of the URL then you will be safe even in the presence of long duration caching.
It sounds safe to me.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.