Skip to content

Fix: Cleanup temporary files after upload and on failure (T415717)#92

Open
ShivanshTIwaRISS wants to merge 1 commit into
indictechcom:masterfrom
ShivanshTIwaRISS:fix-temp-file-cleanup
Open

Fix: Cleanup temporary files after upload and on failure (T415717)#92
ShivanshTIwaRISS wants to merge 1 commit into
indictechcom:masterfrom
ShivanshTIwaRISS:fix-temp-file-cleanup

Conversation

@ShivanshTIwaRISS
Copy link
Copy Markdown

Summary:
This PR fixes the issue where temporary files in the temp_images directory are not cleaned up after upload or on failure.

Changes:

  • Added cleanup logic in process_upload and upload_image_task
  • Ensured cleanup runs using a finally block
  • Used safe file handling with context managers

Why:
Temporary files were accumulating in temp_images, leading to unnecessary storage usage and potential system issues.

Testing:

  • Verified files are deleted after successful upload
  • Verified files are deleted after failed upload

@ShivanshTIwaRISS
Copy link
Copy Markdown
Author

I have submitted a PR addressing this issue by ensuring temporary files are cleaned up after both successful and failed uploads using a safe cleanup mechanism.

@ShivanshTIwaRISS ShivanshTIwaRISS changed the title Fix: Cleanup temporary files after upload and on failure (T415717)Fix: Ensure temp_images files are cleaned after upload in both sync a… Fix: Cleanup temporary files after upload and on failure (T415717) Mar 31, 2026
@ShivanshTIwaRISS
Copy link
Copy Markdown
Author

I have submitted a PR addressing this issue by ensuring temporary files are cleaned up after both successful and failed uploads using a safe cleanup mechanism.

PR: #92

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.

1 participant