upload icon indicating copy to clipboard operation
upload copied to clipboard

S3 Downloads leave temp file in /tmp folder

Open jaimeburnap opened this issue 3 years ago • 0 comments

Bug Report

Current Behavior When a file is downloaded that was uploaded with the s3 option. An orphan file is left in PHP's temp folder. Eventually this causes the drive to become fule

Steps to Reproduce

  1. Upload a file with s3
  2. Download file
  3. Temp folder now has a phpXXXXX file with the size of the original file

Expected Behavior Temp file is either not created or is removed

Environment

  • Flarum version: 1.1.1
  • Extension version: 1.0.7
  • Website URL: https://forum.beamdesert.racing
  • Webserver: apache
  • Hosting environment: VPS
  • PHP version: 7.3.33
  • Browser: All
Flarum core 1.1.1
PHP version: 7.3.33-1+0~20211119.91+debian9~1.gbp618351
MySQL version: 5.5.5-10.1.48-MariaDB-0+deb9u2
Loaded extensions: Core, date, libxml, openssl, pcre, zlib, filter, hash, pcntl, Reflection, SPL, sodium, session, standard, mysqlnd, PDO, xml, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, imagick, intl, json, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache
+----------------------+---------+--------+
| Flarum Extensions    |         |        |
+----------------------+---------+--------+
| ID                   | Version | Commit |
+----------------------+---------+--------+
| flarum-flags         | v1.1.0  |        |
| fof-upload           | 1.0.7   |        |
| flarum-tags          | v1.1.0  |        |
| flarum-suspend       | v1.1.0  |        |
| flarum-subscriptions | v1.1.0  |        |
| flarum-sticky        | v1.1.0  |        |
| flarum-statistics    | v1.1.0  |        |
| flarum-mentions      | v1.1.3  |        |
| flarum-markdown      | v1.1.0  |        |
| flarum-lock          | v1.1.0  |        |
| flarum-likes         | v1.1.0  |        |
| flarum-lang-english  | v1.1.0  |        |
| flarum-emoji         | v1.1.1  |        |
| flarum-bbcode        | v1.1.0  |        |
| flarum-approval      | v1.1.0  |        |
+----------------------+---------+--------+
Base URL: https://forum.beamdesert.racing
Installation path: /var/www/beamdesert.racing/forum
Queue driver: sync
Mail driver: smtp
Debug mode: off

jaimeburnap avatar Feb 18 '22 04:02 jaimeburnap