File_column and tmp files


#1

Hi again…

One more item… the file_column plugin uses a tmp directory inside the
/public directory to store a temporary uploaded item. But it looks like
this folder is just going to grow and grow. Is there some way to clear
this out or not cause this to happen?

Thanks once again!


#2

John T. wrote:

Hi again…

One more item… the file_column plugin uses a tmp directory inside the
/public directory to store a temporary uploaded item. But it looks like
this folder is just going to grow and grow. Is there some way to clear
this out or not cause this to happen?

Thanks once again!

Well, I know why the tmp files are building up - they are the ones that
are not removed when the other error I posted about happens. It seems
file_column is moving the file into it’s proper place, or trying to, and
when the error occurs (‘same file’ - having to do with the case of the
file), the file in the tmp directory is not removed.

Now I know why, but still don’t know how to fix it :wink:

jt


#3

On 1/22/06, John T. removed_email_address@domain.invalid wrote:

Well, I know why the tmp files are building up - they are the ones that
are not removed when the other error I posted about happens. It seems
file_column is moving the file into it’s proper place, or trying to, and
when the error occurs (‘same file’ - having to do with the case of the
file), the file in the tmp directory is not removed.

basically, the tmp files are removed once the model is saved without
errors. Before this, file_column can’t remove them, because they might
be needed for a form that is redisplayed because of validation errors.

The idea is to use a cron-job that deletes all files in the tmp
directory that are older than 24 hours or so. Right now, you have to
write this yourself (should be trivial), but patches are welcome…

Sebastian


#4

Sebastian K. wrote:

On 1/22/06, John T. removed_email_address@domain.invalid wrote:

Well, I know why the tmp files are building up - they are the ones that
are not removed when the other error I posted about happens. It seems
file_column is moving the file into it’s proper place, or trying to, and
when the error occurs (‘same file’ - having to do with the case of the
file), the file in the tmp directory is not removed.

basically, the tmp files are removed once the model is saved without
errors. Before this, file_column can’t remove them, because they might
be needed for a form that is redisplayed because of validation errors.

Yeah, I did figure that out. Unfortunately, with the problem with the
file case (at least on OS X), I can’t upload a file with an upper case
name/extension.

Thanks.