mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Use text mime type for csv files for browser preview
Co-Authored-By: Trenton H <797416+stumpylog@users.noreply.github.com> Co-Authored-By: bin101 <12427722+bin101@users.noreply.github.com>
This commit is contained in:
		| @@ -261,6 +261,9 @@ class DocumentViewSet( | ||||
|             file_handle = doc.source_file | ||||
|             filename = doc.get_public_filename() | ||||
|             mime_type = doc.mime_type | ||||
|             # Support browser previewing csv files by using text mime type | ||||
|             if mime_type in {"application/csv", "text/csv"} and disposition == "inline": | ||||
|                 mime_type = "text/plain" | ||||
|  | ||||
|         if doc.storage_type == Document.STORAGE_TYPE_GPG: | ||||
|             file_handle = GnuPG.decrypted(file_handle) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Shamoon
					Michael Shamoon