mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-05 23:42:21 +00:00
Bug affichage documents
This commit is contained in:
parent
021de1a997
commit
67420ed5c7
@ -23,9 +23,11 @@ if ($file !== null) {
|
||||
|
||||
$surname = $user->getSurname();
|
||||
$first_name = $user->getFirstName();
|
||||
$name = "Autorisation de droit à l'image de $first_name $surname.pdf";
|
||||
$mime_type = finfo_file(finfo_open(FILEINFO_MIME_TYPE), "$LOCAL_PATH/files/$id");
|
||||
$ext = $mime_type == "application/pdf" ? "pdf" : ($mime_type == "image/png" ? "png" : "jpg");
|
||||
$name = "Autorisation de droit à l'image de $first_name $surname.$ext";
|
||||
|
||||
header("Content-Type: application/pdf");
|
||||
header("Content-Type: " . $mime_type);
|
||||
}
|
||||
else {
|
||||
$question = Question::fromAttachedFile($id);
|
||||
|
Loading…
Reference in New Issue
Block a user