Closed (fixed)
Project:
Link checker
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2009 at 11:40 UTC
Updated:
7 Jul 2009 at 08:50 UTC
Hi,
I have often needed a list of URLs of all uploaded media (images, PDFs, etc.) since it makes cleaning the server much easier. I could then compare the list of valid URLs from Link Checker against a list of all media on the website root and clean the ones that are not used. Since Link Checker is already checking URLs it maybe be possible to generate a list of all URLs checked and then filter the list according file extension.
Comments
Comment #1
hass commentedSorry, but I do not understand you very well. I'm not sure where you are coming from and what you'd like to archive.
1. You can get the list of uploaded files from the core "files" table.
2. I'm not sure how there could be any file listed that is not on disk or shouldn't be on disk (except you have cluttered your site).
3. If you delete a node the files are also deleted.
I do not think that Link checker could make sure to have *all* files listed. I have seen a few issues I cannot solve... Sometimes Link checker is not able to collect all links. For e.g. with modules like MarkDown, or links not in an "A"-tags or some links that core marks as "invalid", but are valid. Such links are currently not saved in the linkchecker tables and therefore not checked. I cannot say how often such an edge case happens, but it's possible. So - if you delete all files not listed in the link checker table you may delete files currently in use by your site.
Please reconsider what you are doing there... feel free to re-open and describe in details step-by-step what you'd like to archive on the end of the day.
Comment #2
guysaban commentedThanks Hass,
You did understand me. You're comments are much appreciated. I usually FTP upload files to a directory to the server (since its quicker) and then use them in Drupal. So Drupal then copies them to the files directory. Often, as the website changes, I need to clean up the files I no longer need from the FTP directory since they are already in Drupal's file directory. I was thinking that Link checker could help with any customer HTML linking to files (in the FTP directory) that are not uploaded with Drupal. This is were the clutter starts.
Now I understand that I can look at the files table in the DB. I did not think of that. It's a good idea:)
Thanks again for you comments.