fixed document upload location

This commit is contained in:
Felix Ivo 2025-07-08 10:51:57 +02:00
parent 92e162283e
commit 5ef5de9b98
3 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ function sanitize($data, $flags = ENT_QUOTES, $encoding = 'UTF-8') {
<ul> <ul>
<?php foreach($files as $file): ?> <?php foreach($files as $file): ?>
<li> <li>
<a href="/EIANotesApp/Uploads/<?php echo $file['stored_filename']; ?>" download target="_blank"><?php echo htmlspecialchars($file['original_filename']); ?></a> <a href="<?php echo substr($_SERVER['PHP_SELF'], 0, -9).'Uploads/'.$file['stored_filename']; ?>" download target="_blank"><?php echo htmlspecialchars($file['original_filename']); ?></a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>

View File

@ -24,7 +24,7 @@
<?php if (isset($errmsg)): ?> <?php if (isset($errmsg)): ?>
<label class="error-message"><?php echo $errmsg; ?></label> <label class="error-message"><?php echo $errmsg; ?></label>
<?php endif; ?> <?php endif; ?>
<table class="notes-table"> <table class="notes-table">
<thead> <thead>
<tr> <tr>
@ -42,7 +42,7 @@
<?php foreach ($files as $file): ?> <?php foreach ($files as $file): ?>
<tr> <tr>
<td><?php echo sanitize($file['id']); ?></td> <td><?php echo sanitize($file['id']); ?></td>
<td><a href="/EIANotesApp/Uploads/<?php echo $file['stored_filename']; ?>" download target="_blank"><?php echo sanitize($file['original_filename']); ?></a></td> <td><a href="<?php echo substr($_SERVER['PHP_SELF'], 0, -9).'Uploads/'.$file['stored_filename']; ?>"><?php echo sanitize($file['stored_filename']); ?></a></td>
<td><?php echo sanitize($file['stored_filename']); ?></td> <td><?php echo sanitize($file['stored_filename']); ?></td>
<td><?php echo sanitize($file['note_id']); ?></td> <td><?php echo sanitize($file['note_id']); ?></td>
<td><?php echo sanitize($file['owner_username']); ?></td> <td><?php echo sanitize($file['owner_username']); ?></td>

View File

@ -33,7 +33,7 @@ $files = $this->notesModel->getUploadedFiles($note['id']);
<ul> <ul>
<?php foreach ($files as $file): ?> <?php foreach ($files as $file): ?>
<li> <li>
<a href="/EIANotesApp/Uploads/<?php echo $file['stored_filename']; ?>" download target="_blank"><?php echo htmlspecialchars($file['original_filename']); ?></a> <a href="<?php echo substr($_SERVER['PHP_SELF'], 0, -9).'Uploads/'.$file['stored_filename']; ?>" download target="_blank"><?php echo htmlspecialchars($file['original_filename']); ?></a>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
</ul> </ul>