Leantime / leantime

Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind.
https://leantime.io
GNU Affero General Public License v3.0
4.41k stars 578 forks source link

Local file upload/image issues #112

Closed marcelfolaron closed 4 years ago

marcelfolaron commented 4 years ago

This is a tracking issue for the two issues regarding logo and profile picture uploads (#106 & #109 ). Images are not displayed correctly in certain situations. Still trying to determine why.

Please verify and submit:

@quangbahoa and @GhaziTriki please let me know if you can find any additional info on the issue.

quangbahoa commented 4 years ago
marcelfolaron commented 4 years ago

Thanks, when you open the download.php?... file do you get a 404 back or just a blank screen?

quangbahoa commented 4 years ago

Thanks, when you open the download.php?... file do you get a 404 back or just a blank screen?

download.php show a small square ^^!

marcelfolaron commented 4 years ago

Okay, I believe it has to do with the fpassthru() function and how it sends the file to the client. Can you try to replace line 82 and 83 in your download.php

  fpassthru($fd);
  fclose($fd);

with

  while (!feof($fd)) {
     $buffer = fread($fd, 2048);
     echo $buffer;
   }
   fclose($fd);
marcelfolaron commented 4 years ago

I reverted back to the fread. This should be fixed now