Skip to content
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

Temp files can get left lying around #34

Open
zerocrates opened this issue Jun 13, 2023 · 0 comments
Open

Temp files can get left lying around #34

zerocrates opened this issue Jun 13, 2023 · 0 comments
Assignees

Comments

@zerocrates
Copy link
Contributor

The Sideload ingesters copy the file to a temp location, then call validate on it, then run mediaIngestFile. If the validation fails, the temp file won't get deleted.

Two possible solutions I see:

  1. Call delete on the tempFile before returning when validation fails
  2. Don't call validate at all: mediaIngestFile already does that

Option 1 would be the more minimal change. Option 2 is cleaner, but I'm not sure if maybe Sideload had some reason to separately validate... my best guess is that it probably was from when sideload used to work directly off the sideload-directory file without copying it to temp, and it did that to avoid deleting the original file if it failed validation. If that's the case it's not necessary to do separately anymore.

This looks like it's the same issue for both the single and "directory" sideloads.

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

No branches or pull requests

2 participants