Forum OpenACS Q&A: File storage downloads index instead of proper name

I'm using file storage on http://www.safe4all.org

When the users try to download a file from file storage, it downloads a file called index instead of the proper name.

1) I can get around this on the Mac by typing in the document name. Are there any workarounds for PCs? The users are not tech savvy, so even renaming the file is too much for them.

2) Is there a fix for this?

3) Anybody else encounter this?

I'm trying to fix this right away, so any replies are very appreciated.

Collapse
Posted by Jade Rubick on
I should add that the file doesn't work unless it has a .doc extention. So this makes file storage not work at all for these users.
Collapse
Posted by Jun Yamog on
Hi Jade,

I thought this was put back in 4.6.  The problem is that the download page must query the filename on the database.  Much like how it does when you are viewing the file on the version level page.  On the folder level page it must query that too.  And pass that on www/download/index.vuh

So the link on href will be [file-storage mount point]/download/[file name]?version_id=xxx The browser will get [file name].

I have worked on this but the code is pre 4.5 beta and when I reported this about more than a year ago in the bboard it was said that it will be done, I guess it wasn't.

Collapse
Posted by Jeff Davis on
It is in (and has been for a while).  Look at
https://web.archive.org/web/20030530023046/https://openacs.org/storage/index?folder_id=70462
for an example.
Collapse
Posted by Jun Yamog on
Hi Jeff,

Sorry about that.  It got in after all, I wrongly assumed that Jade was reporting about the latest 4.6.

Jade,

You can look at the latest file-storage and see if you can back port to your safe4all.org OACS code.

Collapse
Posted by Brian Fenton on
If you click on View Details on Jeff's link, the link to download the file is still pointing to a file called index. Click on this link to see what I mean https://openacs.org/storage/file?file_id=71418
Collapse
Posted by Jade Rubick on
Thanks, Jun. That patch worked very well.

I also learned how to make patches, so I'll be able to contribute fixes in the future 😊

Is there any process in place by which patches of that sort are rolled into the distribution by those with commit rights?

Collapse
Posted by Jeff Davis on
The process is that they should go in against a bug in bug tracker and I try to apply them or find the right person to apply them if I think someone else should look at them.

Please read the patch submission instructions if you are not sure how we would like to see the patches generated.

There is a reasonable backlog since I was gone over christmas but I am working through them now. If you submit a patch do not mark the bug fixed (that should be done when the fix is actually committed to CVS).