core icon indicating copy to clipboard operation
core copied to clipboard

Assets 'tmp_upload' folder is not cleaned when a file is uploaded via Website Browser

Open joseorsini opened this issue 13 years ago • 4 comments

Steps to reproduce:

  1. Go to Website Browser.

  2. Add a new File/Image asset on any folder.

  3. Take a look at DOTCMSHOME/dotCMS/assets/tmpupload/loggedinuserId/binary1/ folder. The file is temporarily placed there and then a folder is created inside of it, e.g.

    DOTCMSHOME/dotCMS/assets/tmpupload/loggedinuserId/binary1/UUID/ folder

  4. The asset is copied to this new folder.

  5. The asset inside the new folder DOTCMSHOME/dotCMS/assets/tmpupload/loggedinuserId/binary1/UUID/ is moved to the regular asset folder and the content is saved.

  6. The original asset placed here DOTCMSHOME/dotCMS/assets/tmpupload/loggedinuser_id/binary1/ is never deleted. Also, the temp folder created on step 3 is not deleted, although this one is already empty.

All these steps are part of the regular procedure defined in code, but the tmp_upload folder should be cleaned because it may contain a large amount of assets that are already saved.

Reproduced locally in master and in TRF 2.5 Box.

joseorsini avatar Mar 01 '13 19:03 joseorsini

Jose this happens later in the night looking for the code now.

jtesser avatar Mar 01 '13 19:03 jtesser

also we try hard to don't duplicate the file and do a hard link instead

dotjorgeu avatar Mar 01 '13 19:03 dotjorgeu

Yup this class com.dotmarketing.quartz.job.BinaryCleanupJob

jtesser avatar Mar 01 '13 19:03 jtesser

Thanks guys.

joseorsini avatar Mar 01 '13 20:03 joseorsini