Closed (duplicate)
Project:
Drupal core
Version:
6.x-dev
Component:
upload.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 May 2007 at 11:30 UTC
Updated:
28 May 2007 at 09:42 UTC
Similar to SMTP library: Allow for custom filename conversion backend: e.g. to clean filename from i18n characters.
For me, it is always a problem to require from users to upload files with filenames that contain alphanumeric characters (without those special Hungarian characters like: éáíűúő).
In the new version of drupal, we should allow developers to develope a module without patching the Drupal core, to be able to make filename conversion. E.g: cleaning up filename from i18n characters, spaces, etc...
What are your opinions about it?
| Comment | File | Size | Author |
|---|---|---|---|
| upload_23.patch | 988 bytes | keve |
Comments
Comment #1
gábor hojtsyThe SMTP api loads in a big mail sending backend. Now why do we need a separate include file for a single function to clean up chars in uploads? Why don't we simply look for a callback or hook which should be defined? Having a variable for an include file, including that include file and calling one single function on there seems to be overkill to me.
Comment #2
keve commentedThanks for comment.
First of all, do you, guys, think this is important enough to include it into core? Did you have any problem with it?
I wrote the code this way, since the majority of drupal users will not use it. I thought, for them it is faster, to check a variable, than calling a hook.
1. Should i make it with a new hook, which is called by module_invoke_all?
Does it have any chance to get into core?
2. By setting a variable, (checked in the filename conversion module), controlling that in which module should it look for a given function.
Any suggestion, which is faster for general users?
Comment #3
drewish commentedi think something like this would fit in with the changes that i want to make after #115267 gets committed. dopry and have done a little preliminary stuff on a hook_file so modules could have a say in the file handing. this request is similar to what people want for the image module to sort image files by user or that sort of thing. if you've got a hook that passes out a copy of the file object you could move it.
Comment #4
keve commentedThank you for pointing me out. :)
Hook_file would definitely solve this. I will continue to watch http://drupal.org/node/142995 .
I close this issue.
Comment #5
gábor hojtsyMark this a duplicate then.