1

I'm having an issue on my site with uploaded file attachments disappearing. As an example, on our blog, we have images uploaded into the blog post with images added by using the file attachment. I've recently found them being deleted from the server resulting in an image placeholder. Yet the record of the file being attached is there and the source code within is correctly pointing.

Does anyone have any suggestions on how to diagnose this?

Our server is hostgator if that makes any difference. I'm not certain it's a Drupal problem.

  • are you absolutely sure the image was successfully stored? sometimes the image manipulation (resizing, for example) can break and it doesn't actually store the image. I would suggest bootstrapping drupal and manually running some of drupal's image functions to test it out. – jdu Jan 22 '13 at 15:00
  • thanks for your comment jdu. The images were definitely stored, as they appeared on the live site. There is also no image manipulation when uploading. It's just a simple upload. I'm thinking that they must be being deleted manually. Reading around for a similar post that was the culprit there. – Cosades Jan 24 '13 at 16:13
1

We are having a similar issue (http://deepcarbon.net), and it is intermittent. Most of the time it all works. But sometimes the images simply disappear. They were in the database, they were in the file system. Then all of a sudden they were not. Wondering if there's anything new on this topic.

So I know that the files table in the database has a status column. If the status is 0 (temporary) then the file will be removed the next time the cron runs. The other status is 1 (permanent).

I'm also curious about what jdu says "I would suggest bootstrapping drupal and manually running some of drupal's image functions to test it out". Can you explain that more? What functions?

So our current solution is to run a cron every night to determine if any files have been removed from the filesystem since the night before. And we archive the files directory, so we can restore them if need be. At least until the real problem

We've also turned on creating revisions for every change for every content type, so we know when someone does something in a node.

So far we have not had the problem again over the last 3 weeks, so debugging this issue is on hold.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.