Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: upload/deleted directory

upload/deleted directory 4 months 1 week ago #77722

  • jcrist
  • jcrist's Avatar
  • Offline
  • Elite Member
  • Posts: 223
  • Thank you received: 12
  • Karma: 1
What's the purpose of the upload/deleted directory? Can it be cleared periodically?
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77745

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 10244
  • Thank you received: 1533
  • Karma: 353
I never heard of that directory and I don't have it in my test installation.

Are you sure that's not something you did manually and then forgot about?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77754

  • helgebe
  • helgebe's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 5
  • Karma: 1
I have it, tested right now by deleting the folder, and then bulk deleting lots of notes, and it got re-created in that process.
Seems safe to delete, probably works as or is intended as a trash can where you can recover deleted from.
(7.11.1 with no custom modules other than from the module builder)
Last Edit: 4 months 1 week ago by helgebe. Reason: added info about my env
The administrator has disabled public write access.
The following user(s) said Thank You: pgr

upload/deleted directory 4 months 1 week ago #77756

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 10244
  • Thank you received: 1533
  • Karma: 353
@helgebe thanks, we should document this.

You say it's when you delete a note that has file attached, it gets moved from the "upload" dir into "upload/deleted"?

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77759

  • helgebe
  • helgebe's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 5
  • Karma: 1
That is the only thing I have tested, although i tested it from the list, batch deleting, (I'm working on notes upload via api, and had lots of junk in my dev install). I'm assuming it may be for other modules as well, as long as they have some kind of attachments.
It isn't just copied, it is cataloged there based on the generated filename. (the file 1w2e4r5t ends up in ./deleted/1w/2e/1w2e4r5t , and so on)
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77807

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 10244
  • Thank you received: 1533
  • Karma: 353
Are you sure that's not an add-on doing that? Like an "undelete" add-on, I've seen some of those.

I searched the code but couldn't find any reference to this directory... :huh:

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77841

  • helgebe
  • helgebe's Avatar
  • Offline
  • Junior Member
  • Posts: 22
  • Thank you received: 5
  • Karma: 1
SugarBean.php line 5452(sic) have a clue:
/**
* Moves file to deleted folder
*
* @return bool success of movement
*/
The administrator has disabled public write access.

upload/deleted directory 4 months 1 week ago #77845

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 10244
  • Thank you received: 1533
  • Karma: 353
Interesting. There seems to be also an undelete method:

github.com/salesagility/SuiteCRM/blob/ma.../SugarBean.php#L5306

But it doesn't seem to be used anywhere: github.com/salesagility/SuiteCRM/search?...coped_q=restoreFiles

Whereas the deletedFiles function is used, only in one place:

github.com/salesagility/SuiteCRM/search?...scoped_q=deleteFiles

So to answer the original question, this folder stores attachments of deleted items; and you can clear it in "Admin / Repair /
Remove missed files from upload directory".

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.
The following user(s) said Thank You: helgebe

upload/deleted directory 4 months 1 week ago #77867

  • amariussi
  • amariussi's Avatar
  • Offline
  • SuiteCRM Is My Life
  • Posts: 1299
  • Thank you received: 284
  • Karma: 65
I also have this folder. It contains several subfolders all with a similar tree structure but all empty. It seems that the deepest folder in each is a GUID (maybe the GUID is constructed with the names of the folders above):

The administrator has disabled public write access.
Time to create page: 0.037 seconds
Powered by Kunena Forum