Skip to content

Temp files remain in /tmp directory after successful file uploads that can leave device out of space #10565

@ychoi0822

Description

@ychoi0822

Bug report

Describe the bug

After files are uploaded successfully to the final location, temp files remain on the /tmp directory. After a while, this results in no space in disk.

Steps to reproduce the behavior

  1. Go to admin console.
  2. Click on "media library"
  3. Click on "upload files"
  4. Check the files are successfully uploaded to the final location
  5. Check the same files still exist in /tmp directory

Expected behavior

After file has been uploaded successfully to the final location, temp files are removed from /tmp directory.

Screenshots

Pasted Graphic

System

  • Node.js version: 14.15.4
  • NPM version: 6.4.1
  • Strapi version: 3.6.5
  • Database: PostgresSQL
  • Operating system: Linux

Additional context

This was raised previously here - #2752

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugIssue reporting a bugseverity: mediumIf it breaks the basic use of the product but can be worked aroundsource: core:uploadSource is core/upload packagestalestale-before-2022status: confirmedConfirmed by a Strapi Team member or multiple community members

    Type

    No type

    Projects

    Status

    Fixed/Shipped

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions