mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Fix: correct download filename in 2.15.0 (#9599)
--------- Co-authored-by: Trenton H <797416+stumpylog@users.noreply.github.com>
This commit is contained in:
		| @@ -2376,9 +2376,13 @@ def serve_file(*, doc: Document, use_archive: bool, disposition: str): | ||||
|     # RFC 5987 addresses this issue | ||||
|     # see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2 | ||||
|     # Chromium cannot handle commas in the filename | ||||
|     filename_normalized = normalize("NFKD", filename.replace(",", "_")).encode( | ||||
|         "ascii", | ||||
|         "ignore", | ||||
|     filename_normalized = ( | ||||
|         normalize("NFKD", filename.replace(",", "_")) | ||||
|         .encode( | ||||
|             "ascii", | ||||
|             "ignore", | ||||
|         ) | ||||
|         .decode("ascii") | ||||
|     ) | ||||
|     filename_encoded = quote(filename) | ||||
|     content_disposition = ( | ||||
|   | ||||
| @@ -565,6 +565,10 @@ if DEBUG: | ||||
|     # Allow access from the angular development server during debugging | ||||
|     CORS_ALLOWED_ORIGINS.append("http://localhost:4200") | ||||
|  | ||||
| CORS_EXPOSE_HEADERS = [ | ||||
|     "Content-Disposition", | ||||
| ] | ||||
|  | ||||
| ALLOWED_HOSTS = __get_list("PAPERLESS_ALLOWED_HOSTS", ["*"]) | ||||
| if ALLOWED_HOSTS != ["*"]: | ||||
|     # always allow localhost. Necessary e.g. for healthcheck in docker. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 shamoon
					shamoon