Skip to content

Commit

Permalink
Fix file path in download_file.php (#174)
Browse files Browse the repository at this point in the history
* 173: Fix file path in download_file.php

* 173: Small PR fix

Co-authored-by: Atmos4 <[email protected]>

---------

Co-authored-by: Atmos4 <[email protected]>
  • Loading branch information
Mathieu414 and Atmos4 authored Mar 12, 2024
1 parent 1de78ea commit 62cc2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/uploads/download_file.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$file_id = $_GET['id'];

$file = em()->find(SharedFile::class, $file_id);
$path = "app/uploads/" . $file->path;
$path = app_path() . "/uploads/" . $file->path;

if (file_exists($path)) {
header("Content-Type: " . $file->mime);
Expand Down

0 comments on commit 62cc2e2

Please sign in to comment.