How to save the original/unaltered filename?

droplet - September 24, 2009 - 15:53
Project:Transliteration
Version:6.x-2.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

hi,
I want to keep the acutally filename to db/Description. is it possiable ? (CCK filefield)

Thanks.

#1

smk-ka - September 24, 2009 - 19:23
Title:how to save the Real/acutally filename to db» How to save the original/unaltered filename?
Component:Miscellaneous» Code
Category:support request» feature request
Status:active» fixed

It wasn't possible — until now. I've just committed a small patch to transliteration which stores the original/unaltered filename in $_FILES['files']['orig_name'][<field_name>]. This information can then be accessed by other modules that wish to make use of it.

For demonstration purposes I've written a small module which fulfills what you asked for: it integrates with filefield and sets the description text to the original filename for newly uploaded files.

AttachmentSize
transliteration-orig_name.patch 716 bytes
custom.zip 848 bytes

#2

System Message - October 8, 2009 - 19:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.