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.59k stars 596 forks source link

Image Broken When Upload #1212

Closed swanadiva closed 1 year ago

swanadiva commented 1 year ago

Hi, i've some issues when upload image in leantime, the image seems broken because the url not found

Screenshot 2022-12-20 at 11 35 11

the url has /tickets while the image only refer to [base_url]/download.php?module=blablabla without /ticket on it http://leantime.otaqu.id/tickets/download.php?module=private&encName=4a61b1c0feb41ea61e1bbae961e975f8&ext=png&realName=pastedImage => broken

http://leantime.otaqu.id/download.php?module=private&encName=4a61b1c0feb41ea61e1bbae961e975f8&ext=png&realName=pastedImage => working

can anyone help me with it? thank you and best regard

swanadiva commented 1 year ago

Well, i think this is a temporary solution, just adding "/" before "download.php" link, so it will be using base_url without the tickets for every repository that adding text via WYSIWYG like this.

$stmn->bindValue(':text', str_replace('download.php', '/download.php', $values['text']), PDO::PARAM_STR);

before, the line was like this: $stmn->bindValue(':text', $values['text'], PDO::PARAM_STR);

this is in class.comments.php