Opened 16 years ago
Closed 16 years ago
#7510 closed enhancement (invalid)
Organize uploads into userlogin based folders
Reported by: | capripot | Owned by: | capripot |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | upload, uploads, user_login, username, user_name |
Focuses: | Cc: |
Description
Hi, I often would like to organize the upload folder with the user logins. It can be practice to delete all files from just one user, or just to separate them for give them a FTP account for exemple.
I modified just two files, the wp-includes/functions.php and the wp-admin/options-misc.php
You can tick the option on Misc Options
If you tick the "Organize my uploads into user_login based folders", Wordpress take your file in uploads/login/
If you tick the "Organize my uploads into month- and year-based folders" too, wordpress take your file in uploads/login/year/month/
Can I integrate this to a final release of Wordpress ?
Attachments (5)
Change History (12)
#2
@
16 years ago
Yes, but for the big files, FTP is more practice.
After that, they have just to write the correct URL in the field "URL" of the Upload window.
And you are right, delete the folder is not a good idea because of attachments. But for the FTP agencement, it can be practice.
Yes I can make a plugin, but how can I modify the function wp_upload_dir() ?
Have I to make copy of the entire function to add the three line I want ?
#3
@
16 years ago
I wrote the plugin "Add From Server" to deal with uploading files via FTP btw - http://wordpress.org/extend/plugins/add-from-server/
Yes I can make a plugin, but how can I modify the function wp_upload_dir() ? Have I to make copy of the entire function to add the three line I want ?
It passes through the upload_dir filter at the end, I did a similar thing with another plugin: http://wordpress.org/extend/plugins/dpost-uploads/ to store uploads into a year/month folder of the post rather than the current date.
Dont get me wrong, I *can* see the use of this by some, I just dont see a use for the large majority of people.
-1 for core, IMO it'd be better used as a plugin, at least for now. I'm thinking of the Personal blogs, Of course, multi-author blogs would have a different situation of course - but a plugin can take care of that for the short-term.
If you wish to delete all files uploaded by a user, Then you also need to remove the attachments from within WordPress, else the Uploads section will get cluttered with non-existant items, So to me, It makes more sense to have a plugin which allows you to delete attachments from a specific author.
Furthur to that: If you give users a FTP directory, and they upload directly into the uploads folder, The file will NOT be available from within the WordPress media gallery/uploads.