I've found the need to have some administration for file attachments. Here's a demo patch of some of the proposed added functionality. This functionality should easily allow users to get a list of the files they've uploaded, so they can get rid of old files if they reach their size limit.
Changes:
- Added an 'administer uploaded files' permission
- Added admin/uploads and 'my uploads', which list uploaded files
Planned changes:
- statistics for the 'my uploads' and admin/uploads pages with total size of uploaded files and size limit
- functionality to delete/rename files (using checkboxes to select multiple files)
Please comment on code quality, current functionality, and planned functionality. Thanks.
Patch applies to 4.6 and HEAD.
| Comment | File | Size | Author |
|---|---|---|---|
| #71 | system_25756.patch | 8.89 KB | drewish |
| #70 | system_25756.patch | 9.73 KB | drewish |
| #69 | issue-25756.patch | 9.65 KB | lilou |
| #65 | upload_admin_D7.patch | 9.81 KB | lilou |
| #60 | upload_admin.patch | 9.52 KB | Susurrus |
Comments
Comment #1
ezheidtmann commentedSounds like a good idea from your description. I haven't tested, but a quick glance at the patch shows an odd comment:
Comment #2
junyor commentedOops. That's what I get for copying code. I'll fix that in the next patch.
Comment #3
moshe weitzman commentedLooks useful to me. If I had more uploads on my dev site I would try it out.
Some code comments:
- don't reuse upload_page() for both user and admin page. split off admin stuff into a new menu callback which points to a new upload_admin_page() function.
- in the query for admin page, don't directly use the UID when building the $sql. instead, pass that as an argument at end of pager_query(). this protects against SQL injection attack
- do we really want to show file locations to regular users? i think not.
- perhaps show node title in the file listing tables
your proposed enhancements look swell to me.
related question: do attachments on unpublished nodes acount against user quota? if so, user is powerless to delete them? this module could fix that I think. when unpublished, i suggest showing node title without hyperlink.
Comment #4
junyor commentedThanks for the feedback, Moshe! I haven't worked on this in a couple of weeks, but I'll try to get back to it soon and I'll add in your feedback. Moving back to active so it doesn't clog up the patch queue any longer.
Comment #5
junyor commentedMoshe: When you said the following:
- do we really want to show file locations to regular users? i think not.
- perhaps show node title in the file listing tables
what did you mean? The "Location" column is the node title where the file is attached. What file location is being shown to users?
Comment #6
moshe weitzman commentedyeah, i think we are ok on file location .... you might consider releasing this as a contrib module if core is uninterested.
Comment #7
junyor commentedHere's a new update. Still not ready for commit, but much further along. Developed against 4.6, but patch applies to CVS with some fuzz. Uploading files didn't seem to work for me in CVS, so I couldn't test whether the patch worked.
When the time comes, I hope this will be considered for core, as it seems like missing functionality to upload.module now.
Changes since last patch:
* Split upload_page into upload_page and upload_admin
* Added 'delete all selected files' operation on admin/upload and upload pages
* Fixed upload_admin query to avoid SQL code injection (thanks, Moshe)
* Renamed "Location" column to "Title"
* Don't show unpublished nodes as links in the "Title" column
* Fixed bugs so that you can actually delete files now ;)
To Do:
* statistics for the 'my uploads' and admin/uploads pages with total size of uploaded files and size limit
* figure out why status messages remain across page loads
* get Operations column working
Questions:
* What operations should go in the Operations column, anyway?
* What other operations should be added to the mass-operations drop-down?
Comment #8
junyor commentedNew patch.
Changes since last patch:
* Added basic statistical information to /admin/upload and /upload
* Fixed problem getting correct username on /admin/upload
Comment #9
m3avrck commentedHey Junyor, awesome patch!
I've recently wrote my own PHP based file management script that does very similar (but not in a Drupal enivorment). I've attached a screen shot of the interface.
As for operations, I'd love to see the basics like what I have. Copy (file or folder), Move (file or folder), Zip (file or folder) for download, and obviously delete, upload, and create folder :) Also, I have a function that cleans file names too, replacing spaces and weird punctucation with a certain character (right now just a _) to avoid conflicts on Windows based machines. This feature could obviously be enabled or turned off.
I researched this quite a bit and I've found some top notch code for all of these operations, all open source as well. Additionally, all of the icons are from this set that was released as open source as well so we could include those too.
I'd love to contribute and work with you to further extend this module. Having solid file management features would be great in Drupal.
Junyor, just drop me a line through the Drupal contact and I'd be glad to discuss things and aid in the development of this!!
Comment #10
junyor commentedI think the changes you want are outside the scope of upload.module, let alone this patch. It's probably better to work on a new contrib module with the functionality you're referring to. FWIW, file.inc already has some functions you could hook into. Good luck!
Comment #11
junyor commentedUpdated patch for CVS. Removed operation column, as I couldn't find a way to get the delete link to work and the checkbox will work just as well anyway. Please review. I'd like to get this into 4.7.
Comment #12
m3avrck commentedLooking good but needs some work.
The link to each file that has been upload is malformed:
http://localhost/drupal/?q=http://localhost/drupal/files/upload.moduleSome reason that is absolute and it shouldn't be, looks like line 280 is the problem there. 'Page not found' with dirty URLs. However, with clean URLS, I get 403 forbidden "access denied" to this link: http://localhost/drupal/files/upload.moduleIs there a way to set a limit on total file size per user? When I goto "my uploads" it says limit per file and per directory is 1mb yet I don't see any way to set these in Settings > Uploads. Also, shouldn't you be able to set different limits for each user as well?
Additionally, under "my uploads" it says allowable extensions but I don't see anywhere to define those as well?
Under latest HEAD with Drupal running on PHP 5.0.3 I get the following warnings:
warning: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: Argument #1 is not an array in \modules\upload.module on line 124.warning: array_flip() [<a href='function.array-flip'>function.array-flip</a>]: The argument should be an array in \modules\upload.module on line 133.warning: implode() [<a href='function.implode'>function.implode</a>]: Bad arguments. in \modules\upload.module on line 139.Seems all of these warnings are being caused by the extensions variable I pointed out... not defined correctly, and this *should* be configurable option in Settings > Uploads ... not hardcoded like it is in the module.
Please let me know if I can help, I think we can get this into core, it is definetly needed!
Comment #13
m3avrck commentedOk turns out if file dowloads are set to "Private" the links work fine. If they are "Public" over HTTP, they break, as noted above.
Now going along with this, it would be great if an Admin could set permissions for each of these files for viewing... e.g., if files are set up to be "Private" to assign which roles can actually view or download these files or to keep them anonymous. I think this would be bring the file management features full circle and finally be up to par with this :)
Comment #14
junyor commentedOK, I fixed the problem with the download URLs. It seems like upload.module doesn't use l() elsewhere, so I used the same syntax. I think I fixed the warnings you got from PHP5, but I don't have it around to test with. Also, I fixed some identation and tab problems. I also updated for current HEAD (there was on reject and lots of fuzz).
Give a specific role the "upload files" permission and you'll be able to configure max file size and extensions. Setting permissions per file or for private vs. public is outside the scope of this patch. I believe there is already an issue for an overhaul of the file system, though.
Comment #15
m3avrck commentedOk looks like the links for public files are formed correctly now. However, I am getting a "Forbidden" access when trying to view the file like: http://localhost/drupal/files/somefile.txt ... is that a problem with Drupal or the module? I checked .htaccess and don't see it restricting files, hmmm.
All of the warnings have been fixed and are working correctly now with PHP 5.
Now you say "Give a specific role the 'upload files' permission and you'll be able to configure max file size and extensions." What if I don't assign this permission to anyone? In that case, UID=1 logged in can only upload files up to 1MB in size and has a total of 1MB of space. Shouldn't Upload > Settings have a default setting then that takes precedence? For instance, go in there and set defaults to 25MB for each. Then logged in as UID=1, I can upload files within those limits. If I then assign another role this permission, they should inherit "this default" instead of having it hard coded as 1MB and having to change again. Does this make sense? From a usability perspective this was how I *expected* it to work but didn't see what was going on till you clarified :)
For the extensions list, I would make the code more robust. I can throw in as many spaces as I want and it is saved with them intact. I would think taking a more standard route of defining extensions like: html,php,txt,doc with a common character seperating extensions, easier to read too especially on a long list :). Then you can just explode(',') and trim() each term, preventing managled extensions from being entered in the database.
Any link or updates with that overhaul of the filesystem? I'd be interested in helping out, who is spearheading that?
Comment #16
m3avrck commentedOh had one more idea... shouldn't there be a global total size limit? As logged in as UID=1 and I'm setting up my website, I should be able to specify a total size for all files with this Drupal install... either 0 for unlimited (which I believe it is now) or enter some number.
Then when I assign different roles the ability to adminster uploads, they can set file size limits too but all of these limits come under one giant umbrella limit that that main admin sets up. Otherwise I could see some problems with authenticated users assigning limits *too* big. Need some sort of check there :)
Sorry for the mass amount of critiques, just want to get this patch squared away as perfect as possible. It's really important to get into core so gotta make sure we cover all of our bases!
Comment #17
junyor commentedDoes the forbidden file problem go away if you create a role that has the 'upload files' permission?
The new file handling was discussed (briefly) on drupal-devel: http://lists.drupal.org/archives/drupal-devel/2005-08/msg00473.html.
Improving settings for the upload.module is a fine idea, but one outside the scope of this patch. Feel free to create new issues and submit patches for them.
Thank you again for your help!
Comment #18
m3avrck commentedWell I shouldn't get 'file forbidden' logged in as UID=1 but I do. However, I have 'authenticated user' set with all of the upload permissions and I still get that error when I try to download a file with Drupal set to 'public' files as a setting.
As for cleaning up the settings, I do believe that is part of this patch and definetly within the scope :) In terms of usability, these settings should be moved around a bit. However, in terms of the code freeze, I believe this patch is ready but it does need a little bit of tweaking before release.
Comment #19
m3avrck commentedPatch ready to be committed! Tested and works great. Forbidden file problem and settings problem are do to inadequacies wit the current Drupal file system, not this patch! More patches needed :)
Comment #20
junyor commentedChanges are needed after the revision patch. I'm going to have to rethink upload_delete() a bit.
Comment #21
junyor commentedUpdated patch to HEAD. I've rolled in the changes from http://drupal.org/node/30025, as they intermingle. I also removed some extraneous whitespace at the end of lines.
I'm still hoping to get this into 4.7.
Comment #22
m3avrck commentedSettings > Uploads shows the same thing as Uploads ... looks like the settings from the other patch weren't moved over correctly?
Comment #23
junyor commentedIndeed. Fixed.
Comment #24
m3avrck commentedPatch works great! Tested out all sorts of circumstances, patch works flawlessly. This is *much* needed functionality in core. This patch doesn't actually add anything that isn't in core, rather it just makes this information readily available which is *very* helpful. Much needed and I think because of that this should go in 4.7.
Rerolled patch to fix a usability issue on Settings > Upload ... using form_group_collapasible() cleans up page when you have more than roll with file permissions.
Comment #25
Souvent22 commented+1. Yes yes. patch worked well. Really like the statistics feature, and the planned extensibility with the drop-down action. hope this makes it in.
Comment #26
dries commentedSouvent22, m3avrck: please review patches more carefully!
This patch needs a lot of work:
1. Many strings can't be translated.
2. Why do we sort the data in PHP and not in MySQL.
3. Why do we retrieve all records in MySQL but not show them all. Why do we show 10 users only?
Problem (2) and (3) should be fixed by creating a table that can be (i) sorted and (ii) paged.
Comment #27
m3avrck commentedDries didn't really look through the code too much, my fault! Just tested to make sure it *actually* works. Will do that tomorrow morning, unless Junyor can patch it before me :)
Comment #28
junyor commentedThis is as far as I'm getting tonight. Not everything is fully tested, but I believe I've addressed Dries' concerns. However, I've come up with a couple additional problems during testing and in code review. I'd appreciate help on my to do items, especially the last one.
To do:
- simplify user portion of upload_statistics
- add revision deleting to upload_delete
- figure out how to take revisions into account in queries (NOTE: the query in upload_total_space_used() is apparently wrong); right now, each revision just adds to totals or shows as an additional item in the 'my uploads' list
Done:
- changed a lot of double quotes to single quotes
- added lots of t()s
- greatly simplified admin portion of upload_statistics
- moved disk space usage list to a separate tab
- made disk space usage list show all users in a sortable table
- fixed some comment typos
- just return from menu callbacks instead of using theme('page')
Comment #29
moshe weitzman commentedIn upload_total_space_used(), it looks like your query will give right results if you JOIN to the node table instead of node_revisions. same for your "too many items in list" problem. I didn't test these theories, just perused the patch.
Comment #30
junyor commentedAnd another update:
- Fixed help texts so they actually display
- Added new help texts
- Split out admin statistics to upload_admin, since it was only three lines
- Fixed a bug introduced in the last patch related to the display of per user statistics
The problem in upload_total_space_used() and other queries I'm adding need to be addressed by changes to the files table, IMHO. That, and the changes for deleting revisions, will have to wait for a revision bug fix patch.
That leaves cleaning up upload_statistics.
Comment #31
junyor commentedOK, all done. upload_statistics() has been cleansed.
Comment #32
m3avrck commentedDries, just a heads up that Junyor, Souvent, and myself have been discussing this issue all day in #upload ... many hours went into this patch, all of your concerns have been addressed, along with many others we have discovered. This patch is rock solid and we'll be posting one final patch very soon that completes this. Better administrative options is all this patch introduces, no changes to how files are handled. Also, this patch uncovered 2 bugs inherent to revisions that were overlooked so this patch has been very worthwhile :)
Comment #33
Souvent22 commentedOk, fixed a few things. From the top now:
- Fixed the quries that were returning incorrect information. Namley, disk usage per user, and total disk usage.
- Added a new function to calcuate the number of files a user has.
- Formatting issues.
Now, there is a serperate issue, which should be addressed in a seperate bug, which is the current layout of the file table. I believe a second table (associatve table) should be used to link revisions to files, instead of lots of redundant data in the files table. This is a normalization issue. However, I am using the system as is, and have adjusted the quries, etc. to fit.
Comment #34
Stefan Nagtegaal commentedHi guys!
Sorry for jumping in so lately on the threat, but I reviewed the code and I must say that I like what I see..
Though, some problems code-wise imo:
Why is the first argument not set? IMO this should always be set, otherwise use drupal_set_message('error', $message).
Secondly you guys are using:
By the 'introduce theme wrapper function' threath, comment #37 Dries encourages people to remove the usage of theme('box').. So, looking at the future you guys can probably do the same? Try not using the theme('box'), but try something else...
For what's left, I love the functionality!!! Very, very good work..
Comment #35
junyor commentedI agree with Souvent that the revision information should be moved to another table. It's causing a lot of excess data in the files table. Also, most of the queries related to revisions in upload.module are currently broken. My patch uses the queries as they should be given this change in the file table.
@Stefan:
I copied the form_set_error() stuff from node.module, which also doesn't set the first parameter. I've looked at the way several functions use form_set_error() and the first parameter seems to be the name of the form that must be corrected. According to nodeapi_example_nodeapi[1], "the user must correct the error before being able to submit the [form]." I don't think that should apply to this form, just as it doesn't apply to the update form on the node admin page.
Is there a good alternative to theme('box')?
[1] http://drupaldocs.org/api/head/function/nodeapi_example_nodeapi
@Souvent:
I'm not sure all those changes are necessary.
1) You added a separate upload_file_count function which does an additional query. All the file count and size information comes from one query in my version, which I think is faster.
2) You removed some commented out code: cool.
3) You changed the number of entries on the file list page from 50 to 25. The node, comment, and watchdog overview pages all use 50, so I was just going for consistency.
4) You updated a bunch of queries to work-around bugs introduced by the revision patch. I'd like to fix the problems with the revision patch in a separate patch instead of adding work-arounds.
5) You changed the way upload_admin_usage gathers space usage about users. Instead of a single query, there's now a query per user. That's a bit expensive, isn't it?
6) The query in upload_admin_usage() was indeed broken. However, I seemed to be able to fix it by doing the group by on u.uid instead of f.fid.
I've attached a new patch with #2 and #6 addressed.
Comment #36
m3avrck commentedJunyor,
Souvent and I spent many hours last night after you posted your patch fixing many many bugs.
1. Yes we have another count query but this one actually works ;-) count(*) has the same aggregate problems as sum() and because of the nature of the files table, will *only* work this way without subselects. either the tables get changed around a bit or subselects be allowed. since the later assumes everyone is using MySQL 4.1 seesm like the former is the answer. We have already created an issue for this: http://drupal.org/node/31354
In addition, this patch *won't* get in if it assumes that another patch will to fix the table, this is not good. Souvent and myself have already committed ourselves to this patch and the other patch and will update things accordingly. If our propsed patch gets in with the correct queries, we'll post a patch later to fix the files table. Once that patch goes in, we'll post a patch to "re-fix" the uploads module to get it up to speed. Sure this is double work, but this is the best method and only way we can get this patch in now. We'll take care of it :)
3. We can change these back to 50, was just a bit too many in our opinions but consisently rules out.
4. We didn't introduce any "workarounds". Rather, we got it working as is :) Once the updated revisions patches go in: http://drupal.org/node/31355 we'll accordingly refactor this patch. Again, this patch can't wait for others, otherwise it won't go in.
5. Again, same problem with subselects.
6. We already fixed it.
Again, the biggest problem is the fact that Drupal does *not* support subselects, hence we have to be creative in our queries :) Sure a better files table would help, *however* this won't necessarily fix all of the queries magically. I still see the subselects coming into play. We rigorously tested all of the queries last night and they do indeed your work. Your patch was broken in many cases because of this.
We can roll another patch addressing Stefan's concerns.
Comment #37
m3avrck commentedStefan: Souvent, Junyor and myself all discussed your ideas. The first, form_error('') is indeed valid. The content tab in admin uses the same interface setup and uses the function in the exact same way. Check node.module to see this.
Second, while we agree with the theme('box') issue, the rest of the Drupal still uses theme('box') in the same type of ways. Since there is no "better" way to do this, we went with consisentancy since we can't come up with a better alternative.
Also, we have all reached an agreement, this patch does indeed work and works *very* well. The issues with files and revisions is completely seperate. This patch works 100% and if later on their are core changes to files and revisions, we'll update upload.module accordingly (which we hope to do too :)).
New patch in a bit to fix the other outstanding problems.
Comment #38
m3avrck commentedUpdated patch, addressed remaining issues and cleaned up a few small things. Ready to go from this side!
Comment #39
m3avrck commentedSmall typo in query just discovered, fixed now.
Comment #40
Souvent22 commentedLooks solid, and works solid. +1. This is a big help the the uplaods arena. I also like how this patch has been planned; regarding known issues (file table, etc.), and def. going to address those, but for now, it would be nice to have this functionality at a minnimum.
Comment #41
Cvbge commentedHello, I've scanned the patch and you need to change
$result = db_query('SELECT fid,filesize FROM {files} f INNER JOIN {node} n ON f.nid = n.nid WHERE n.uid = %d GROUP BY fid', $uid);in upload_space_used() to
$result = db_query('SELECT fid,filesize FROM {files} f INNER JOIN {node} n ON f.nid = n.nid WHERE n.uid = %d GROUP BY fid, filesize', $uid);(i.e. add filesize to GROUP statement. Otherwise it won't work in postgres. This should not change anything, as all rows with the same fid have the same filesize (if I understand the meaning of fid correctly)).
The same goes to
$result = db_query('SELECT fid,filesize FROM {files} GROUP BY fid');in upload_total_space_used() - needs filesize in GROUP BY.Comment #42
Cvbge commentedComment #43
m3avrck commentedUpdated SQL as per Cvbge's comments.
Comment #44
praseodym commentedSounds useful to me too. Not having read all the comments, would it be possible to get some nice table of how much space users use? I have a site with a small 100 MB of uploads, and sometimes I want to know who uploaded the most.
Comment #45
m3avrck commentedpraseodym, already built in this patch, there is a tab with basic file upload statistics right now :-) hope to add more statistical information later but this patch sets the stage for everything.
Comment #46
praseodym commentedSee the above comment as a +1 and some future ideas :).
Comment #47
junyor commentedSo no longer in sync with HEAD.
Depends on:
http://drupal.org/node/35121
http://drupal.org/node/31323
http://drupal.org/node/31354
Comment #48
Stefan Nagtegaal commentedThis patch would add a lot of very usefull features to drupal. I hope you guys are going to work a little more on this, maybe it'll even get committed before the release of 4.7?
Steef
Comment #49
junyor commentedI definitely want to get this into 4.7! However, the three issues listed in my previous comment must be fixed before this patch can land, as they prevent testing and conflict with code changes in this module.
Thus, I hope this can land during the usability improvement period planned after the 4.7 RC is made.
Comment #50
junyor commentedDries has said that this patch won't make it into 4.7, but will be considered for 4.8. Therefore, I'm going to release this as a contributed module for 4.7. Some parts of the patch, such as the default settings for uploads, cannot be in a contrib module, so I've reopened http://drupal.org/node/30025. This contrib module is also dependent on http://drupal.org/node/31354 getting into Core for 4.7. If it doesn't, the contrib module won't happen. I'll post more about the contrib module once that patch lands.
Comment #51
Jaza commentedMoving to 6.x-dev queue.
IMHO, this should all be in a contrib module if possible. Most users just want basic uploading functionality, they don't care about advanced administration and reporting on uploads.
Comment #52
birdmanx35 commentedFeature requests go to 7.x.
Comment #53
Susurrus commentedSubscribing +1
Comment #54
wim leersSubscribing.
Comment #55
Susurrus commentedAlright, so I've done a little bit of working rerolling this for HEAD. Not everything is there from the original patch, but it's a start. I just want to get some more feedback on it before I continue and because I'm not positive on how to correctly finish this up.
Issues
Work to do:
Comment #56
Stefan Nagtegaal commentedNice!
Any further progress on this?
Comment #57
Leeteq commentedThis feature request could be related/of interest:
Up(load)API module:
"Support for zip uploads (and extracts) and multiple uploads of single local files"
http://drupal.org/node/236299
Comment #58
Susurrus commented@stefan nagtegaal: I'm actually looking for more input on the patch I submitted in #55, as I'm not sure how best to proceed regarding some of the problems I've run into. I'm not familiar enough with FAPI as well as some other things that higher-ups probably have an opinion on. If someone wants to pitch in with some code or suggestions on how to code some of the other parts of this patch, I'd like to get this all wrapped up.
Comment #59
Susurrus commentedAlright, so I've made a little more progress. Everything has been resolved except for the following:
The code probably needs better documentation and some general cleanup, but the gist of it is here now. If anyone wants to pitch in on the tablesorting, that'd be great.
Comment #60
Susurrus commentedThe tablesorting is now fixed and the only issue that needs to be resolved now is file deletion.
Please test and let me know what you think.
Comment #61
Susurrus commentedI'm curious about what anyone else thinks about this patch, especially someone with commit rights. I'm not sure if I should continue to work on this patch as I'm not sure if it should be included in core. Using the modules within core, it seems like only upload.module will deal with files of any kind. Supposedly the new files table organization means that files are tied to users and not nodes, so I would think file administration would make sense, though files that exist without a node doesn't ever seem to happen. Can anyone offer some input into this?
Comment #62
deepvoice commentedFeature Request: Per File Download Permissions. Have a situation right now that I have a single file that I only want certain groups to have access to and a Sysadmin whose only permissions are to keep this file up to date.
Comment #63
junyor commented@deepvoice: That feature request is outside the scoop of this patch. Please file a separate issue report.
Comment #64
walker_643 commented+1 Excellent. Must make available for 7.x
Comment #65
lilou commentedReroll.
Comment #66
Susurrus commentedFiles don't ever seem to exist without a node, though. I think this functionality is not as important if this could all be done through the node administration pages, though that wouldn't be as clean.
Also, was file deletion added, it wasn't part of my last patch?
Comment #67
keith.smith commentedPer coding standards, please follow comments with full-stops (periods).
Also, where possible, try to reduce the amount of HTML in strings that must be managed by translators. Something like:
Comment #68
drewish commentedThis is going to need a full overhaul now that hook_file's been committed. Should be a lot cleaner now though.
Comment #69
lilou commentedReroll, not tested ...
Comment #70
drewish commentedThis shouldn't be limited to just files created by the upload module. It should work for any file that the site knows about so I moved it into the system.module. I'd toyed with adding a new file.module but decided I'd hold off on that until I can see how the core maintainers feel about it.
I clean up quite a few things and tried to bring this in line with the node module but broke a few things since I can't figure out how the whole delete confirmation is supposed to work in the same form where you're selecting the files. Perhaps when I've had some sleep it'll be apparent to me.
Comment #71
drewish commentedthat last patch had some unrelated changes rolled in.
one thing i'd like to do with this is provide a /system/content/files/%file page that lists the file's properties and which modules are referencing it.
i also think we need to give the deleting some thought since there are now "hard" and "soft" deletes. the hard ones override the any module that claim to be using the files where the soft deletes only remove files that aren't in use.
Comment #72
drewish commentedi forked this code to start with a clean issue (#322287: Add file.module to provide UI for managing files) since we're really at a different point when this issue started back in 2005