Files module file naming issue

Hi...

I've started the process of upgrading from 7.0.0 to 7.0.9 in prep for the 7.1 release.  I've gotten up to 7.0.3 so far with mostly just a couple of nagging small issues that I was able to fix.  One issue where I'm stuck is in the files module.  I have some custom php scripts that run on a schedule to generate custom pdf files based on data in the Dolphin db.  It is run once a day.  I created the files once via the gui to get the file into the db and create a file in the file's data directory.

For example...

There was a file called 2.pdf which matches the id number generated in the db.  I updated the file size and date information in the db every time the script ran. People could click on the download link to get the file and all was well.

Now that I've upgraded to 7.0.3 I've noticed that I get "file not found" when clicking on the download link for the file.  The scripts still run fine, but the link to the file is broken.  Now I see that files were created when I upgraded in the data directory that have the following format...

2_{some numeric value - assumed to be some hash}.pdf

I can't find the code that generates that value or the significance of the string generated.

I tried changing the script to reflect the new file name and reran the script.  It updated the file with the new content and assigned the new file name, but I still get a "file not found" error message when I try to click on the download button.

What am I missing to link the actual file to the link the download button is looking for?

Thx.

Mike

Quote · 21 Nov 2012

During the upgrade from 7.0.0 to 7.0.1 it was custom script which rename files, it looks like in your case it was not run properly due to permission, or some other problem, the script is:

upgrade/files/7.0.0-7.0.1/modules/files/script.php

Rules → http://www.boonex.com/terms
Quote · 22 Nov 2012

Hi...

I was on the right path, but guessed wrong.  I used the md5 function instead of sha1.  Replaced md5 with sha1 and now all is well.  Thanks for the pointer so I could dig out the right function call.

Thx.

Mike

Quote · 24 Nov 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.