Skip to content

Not remove the files in the temp directory #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

davidsf
Copy link

@davidsf davidsf commented Mar 5, 2025

With the inclusion of the config storagePath, the temp path could be not only for cbwire, sharing the directory to other functions.

So now, it dangerous to remove all files in the temp directory.

@grantcopley
Copy link
Collaborator

@davidsf Good catch. I forgot that we're clearing out temp files that are older than a day. I'm not sure I want to completely remove that functionality because the temp files will build up over time.

The addition of the storagePath config setting is from this PR #177, and @linxonrails mentions needing to change where uploads are stored, which thinking about it more, is a separate issue from where CBWIRE's .cfc and .cfm files are stored.

I'm thinking we need to separate these out perhaps into separate config settings.

cacheStoragePath - The path where CBWIRE stores any cached files for its internal use and we document that this is cleared out regularly by CBWIRE.

uploadStoragePath - The default path where file uploads are stored.

Thoughts?

@davidsf
Copy link
Author

davidsf commented Mar 5, 2025

As you say, I think is more logical to have two config settings for the two different temp directories features and only remove the cacheStoragePath.

The question is where/when remove the files in the cacheStorePath?

@mrigsby
Copy link
Contributor

mrigsby commented Mar 5, 2025

Just to add my $0.02 🤷🏻‍♂️

I think there is a real need for two seperate temp paths

  1. A temp location for CBWire to do its "magic" for single file components
  2. A temp location for file uploads

Right now both are using the same path moduleRootPath & "/models/tmp"

I believe early on the file uploads where just using the webroot then moved to moduleRootPath & "/tmp", but I could be wrong. I've wanted to change this but it wasn't high on my priority list since I haven't been using cbwire for file uploads as of yet.

I personally would prefer to not use the same temp location for both of these. I don't see a problem with the models/tmp for the unpacking of the single file components.

File uploads, IMHO however should be saved outside the webroot. I agree with @grantcopley that we need to separate these into two different settings and maybe with a setting that would turn on/off the auto deleting of files to help prevent possible conflicts with other functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants