Download & Extend

File names are gone when a subdir is setted in Filepath settings

Project:FileField Private Downloads
Version:6.x-1.0-alpha1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I would like to know if is possible to download the file with the original name. At this moment, files are downloaded with numbers and without extensions:

I uploaded: file.jpg
But the downloaded file is 1

Also, I have noticed that FileField provides a more complex function to download the field: see filefield_file_download() maybe this module can use this function instead to provide its own download method. What do you think?

Cheers

Comments

#1

Title:Real name for the file» File names are gone when a subdir is setted in Filepath settings
Status:active» needs review

Ok, this is indeed a bug.

I was getting numbers instead of real names because I was using the token [uid] for "path" in Filefield settings.

The patch attached fix this problem.

To replicate this bug, define a value for path settings into Filefield settings. When the file is uploaded, it is renamed to the name of the internal dir.

So if you put myfiles as filepath, files will be renamed myfiles_1, myfiles_2, etc

AttachmentSize
filefield_private-705766.patch 1.09 KB

#2

Category:support request» bug report

#3

Status:needs review» fixed

Fixed: http://drupal.org/cvs?commit=325806

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.