mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 13:12:20 +01:00 
			
		
		
		
	Bug affichage documents
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user