Closed (fixed)
Project:
Upload path
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 May 2008 at 08:08 UTC
Updated:
9 Sep 2008 at 07:55 UTC
You may have noticed, often files uploaded to websites are poorly named. This shows through when users may download an image from a website, view a tooltip, the properties of the image, etc...
I made a patch that provides a config admin setting to enable the renaming of uploaded files to semantic match the node content.
Of course, the original uploadpath tokens are also applied to create the full path. This patch applies only to the, end, actual filename part of the filepath.
example: DCM1000x.jpg ---becomes--> my_actual_node_title_1b345f.jpg
The result filename:
See attached.
DT
| Comment | File | Size | Author |
|---|---|---|---|
| uploadpath.module.patch | 8.31 KB | davidwhthomas |
Comments
Comment #1
davidwhthomas commentedNote: the above patch includes my other patch to allow uploadpath settings per node type etc...
DT
Comment #2
merilainen commentedhas a unique code (e.g a2b3ce5ff1) added to the end to prevent duplicate filenames.
Why this? I think upload module appends always _0, _1 etc. to duplicate files. It would be nice to have the document name in a nice form if there are no duplicates in the folder.
Comment #3
davidwhthomas commentedComment #4
davidwhthomas commented