I regularly create ebooks and how-to guides which I upload to FILES.
I want to re-upload a newer version of a previously created ebook, however when I click edit in the actions box, it only gives me the option to change the title, tags, description and categories.
I cannot re-upload and replace the old pdf file with the newer one.
hmm.
If I have to create a new page, this would eliminate all my ratings, comments and social shares for the current page.
What a pickle.
|
I'm curious, why would you want to make a different file with the same name? If it's an update, why not let the name reflect it's a newer version? http://towtalk.net ... Hosted by Zarconia.net! |
You will need to upload the file using ftp, replacing the old file with the new one making sure the name is the same. I would suggest making a note on the page that the file has been updated. Geeks, making the world a better place |
I don't want to make a different file with the same name. I'd like to avoid that.
Optimally, I'd like to be able to upload the newer version of that pdf file to the same file page, but that doesn't appear possible.
|
I don't want to make a different file with the same name. I'd like to avoid that.
Optimally, I'd like to be able to upload the newer version of that pdf file to the same file page, but that doesn't appear possible.
If your looking to have both versions be available on the same page. Then no. It's not possible.
https://www.deanbassett.com |
I want to re-upload a newer version of a previously created ebook,
To re-upload I thought you meant that you wanted to replace the current pdf file with the newer version. If that is what you want to do, then use ftp to overwrite the old file with the newer one and that will accomplish what you wish to do. If it is not, then please tell us what it is that you want to do instead of re-upload.
Geeks, making the world a better place |
Yes, I want to replace the older version of the file with the newer version.
I don't want 2 versions of the same file.
The 2nd thing I thought of after not being able to replace the old version when I click edit in the actions box, is FTP.
However, when I FTP'd to modules > files > data > files I see all my files listed as binary like this...
1_23745f3f07cd5c2c9dd2d07d18e5e06d267ca3f1
I cannot identify which file is which.
If they were listed like joe-shmo.pdf instead of binary files, it would be easy as pie.
|
Yes, I want to replace the older version of the file with the newer version.
I don't want 2 versions of the same file.
The 2nd thing I thought of after not being able to replace the old version when I click edit in the actions box, is FTP.
However, when I FTP'd to modules > files > data > files I see all my files listed as binary like this...
1_23745f3f07cd5c2c9dd2d07d18e5e06d267ca3f1
I cannot identify which file is which.
If they were listed like joe-shmo.pdf instead of binary files, it would be easy as pie.
Yes, Dlophin hides the original file with the hash name. Let me see what I can figure out for you by looking on my site.
Geeks, making the world a better place |
Thanks geek_girl.
The reason I bring this up is that if I have a 50 page pdf file with 100's of comments and ratings on the file page, and I need to change a few hyperlinks or add a paragraph or two to that pdf file (small changes), I cannot replace the old with the new.
Having to upload the revised pdf file to a brand new page is bonkers.
|
Thanks geek_girl.
The reason I bring this up is that if I have a 50 page pdf file with 100's of comments and ratings on the file page, and I need to change a few hyperlinks or add a paragraph or two to that pdf file (small changes), I cannot replace the old with the new.
Having to upload the revised pdf file to a brand new page is bonkers.
Yes, I agree one should be able to update the file with a newer version.
Looking at the database did not show anything so I went and grabbed the script from the action download button:
window.open('{moduleUrl}download/{fileUri}', '_blank', 'width=500,height=380,menubar=no,status=no,resizable=no,scrollbars=yes,toolbar=no,location=no')
Which is not any help. To find the hash file name associated with the display name means going into the module code. Dolphin does not seem to provide an easy way. You could modify the module code to display the hash name to you; hiding it for anyone that is not admin, on the display page for the file. I don't know the file module very well, perhaps someone else can tell you how to modify the code to display the hash name for you.
Geeks, making the world a better place |
Finding the filename is a bit tricky. But can be done.
First, go to the url where your file is so you can get the URI.
Example.
http://www.yoursite.com/m/files/view/dbtest
The URI is the last part that appears after m/files/view/
In this example it's dbtest.
Now run a query in phpMyAdmin
SELECT CONCAT(`Owner`,'_',sha1(`Date`)) FROM `bx_files_main` WHERE `Uri`='dbtest'
Replace dbtest in that query with your actual files URI.
The result of that query will be the file name which will look something like this.
2_8eee130450ccf27b5c7dd046afdcaa6b8ffe3fec
To break down what that file name is.
2 is the owners member id and will be different depending on what member uploaded the file. That is followed by a _ and then a sha1 hash of the date(unix timestamp) https://www.deanbassett.com |
Finding the filename is a bit tricky. But can be done.
First, go to the url where your file is so you can get the URI.
Example.
http://www.yoursite.com/m/files/view/dbtest
The URI is the last part that appears after m/files/view/
In this example it's dbtest.
Now run a query in phpMyAdmin
SELECT CONCAT(`Owner`,'_',sha1(`Date`)) FROM `bx_files_main` WHERE `Uri`='dbtest'
Replace dbtest in that query with your actual files URI.
The result of that query will be the file name which will look something like this.
2_8eee130450ccf27b5c7dd046afdcaa6b8ffe3fec
To break down what that file name is.
2 is the owners member id and will be different depending on what member uploaded the file. That is followed by a _ and then a sha1 hash of the date(unix timestamp)
My guess is that the download part does something similar to find the file but then creates the download with the actual name of the file and not the hash name.
Geeks, making the world a better place |
Very similar. But it uses php code to figure out the filename. Then it sends a special header to the browser. The filename itself is not changed. The header that is sent is kind like right clicking on a link and selecting save as. Not exactly the same, but the header information tells the browser what file name to use to save the file as.
Storing the file as a hash of the memberid and date is dolphins way of preventing possible file name conflicts in a multi user environment. https://www.deanbassett.com |
wow. that's a process. but doable.
let's say I find the correct file name.
silly question, but how do I convert a pdf into a binary and upload? or do i not need to? is it still in pdf and just renamed as a hash (which would mean I rename the newer version of the pdf using the same hash, remove the .pdf extension, then upload/overwrite the existing version)?
i get dolphin needs to prevent file name conflicts. this is the way it does it.
but, dolphin also needs to allow for file updates. it's the nature of many files... to be constantly or occasionally updated.
that edit box or another clickable box (in future versions) should allow for this. i'd make the suggestion, but don't know where to post it or if it'll be read.
|
silly question, but how do I convert a pdf into a binary and upload? or do i not need to? is it still in pdf and just renamed as a hash (which would mean I rename the newer version of the pdf using the same hash, remove the .pdf extension, then upload/overwrite the existing version)?
You do not need to. Just rename the file.
Say your file is myfile.pdf. You just rename it to match the hash and upload using FTP or Cpanel replacing the existing one. The file itself is not changed. It is a pdf file. Only the name of it is a hash.
And yes. Dolphin should provide a way to replace the existing file. But they don't.
https://www.deanbassett.com |
Got it.
Thanks for all your help! :)
I will follow this process while finding a way to push for future changes.
|
Got it.
Thanks for all your help! :)
I will follow this process while finding a way to push for future changes.
Send AlexT a message with the link to this post and request this as a future feature.
Geeks, making the world a better place |
|
Currently there is no option to re-upload file with the same name in Files module, as Store module uses Files module, there is no such feature in Store module as well. Rules → http://www.boonex.com/terms |