Jump to content

Could not delete file: Filename invalid. Trying to Prune Old Attachments (cleanup operations)


Damo

Recommended Posts

  • 4 months later...
  • WHMCS Support Manager

Hi,

This suggests that either the path to your attachments directory in the configuration.php file is invalid (you'd also get an error when attaching new files if that's the case).

 

Or it could be that file being deleted has already been removed from the /attachments directory outside of WHMCS and now it can't find it to delete as part of the cleanup operation.

Link to comment
Share on other sites

  • 2 weeks later...

We are experiencing the same problem.

 

The path to the attachments directory is correct, permissions and ownership are correct and there are no problems receiving tickets with attachments.

 

The explanation that there may be "an attachment that has already been removed" is noted.

 

Don't leave us hanging here. Please follow through with a solution.

 

 

Thank you,

Uwe Schneider

Link to comment
Share on other sites

Hi,

This suggests that either the path to your attachments directory in the configuration.php file is invalid (you'd also get an error when attaching new files if that's the case).

 

Or it could be that file being deleted has already been removed from the /attachments directory outside of WHMCS and now it can't find it to delete as part of the cleanup operation.

 

Attachments are being added fine so guess it is not an issue with path but rather whmcs not finding them and not completing clean operation.

 

How to correct this?

Link to comment
Share on other sites

This is a bug as I deleted all attachments from attachments folder using FTP and went back to Cleanup Operations page which reported

 

Prune Old Attachments

Number of Saved Attachments: 0

Filesize of Saved Attachments: 0 MB

 

I added attachment to a support ticket which was uploaded fine as going back to the ticket showed the thumbnail of the image, I could see the file exists via SSH and see WHMCS now shows the newly uploaded image

 

Prune Old Attachments

Number of Saved Attachments: 1

Filesize of Saved Attachments: 0.19 MB

 

So I set the date to 11/02/2015 (tomorrow) so it deletes all attachments before 11/02/2015 (today)

 

but WHMCS again reported "Could not delete file: Filename invalid".

 

So attachments add fine but cleanup operations is not deleting anything even though the permissions are correct?

Link to comment
Share on other sites

  • 1 month later...
  • 2 years later...

Hey, Chris.

There's no path to attachments directory on the configuration file. What's it supposed to be?

And I did delete files manually several times throughout the years, for this function never worked for me.

Edited by Patty
Link to comment
Share on other sites

Tks for the tip, HostXNow, but I don't want to lose all files, just the very old ones.

Maybe a sql command to delete the attachment if the date is older than d/m/y?? How would that be? I'm no programmer, sorry for my ignorance.

Andrew, I don't see any error on the Activity Log.

Edited by Patty
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated