mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-04 03:27:12 -05:00 
			
		
		
		
	Fixes a couple of minor bugs in the downloading of documents and additional consumer ignore items
This commit is contained in:
		
							parent
							
								
									fac6fe0c2e
								
							
						
					
					
						commit
						35b3216fee
					
				@ -6,7 +6,7 @@ import zipfile
 | 
			
		||||
from datetime import datetime
 | 
			
		||||
from time import mktime
 | 
			
		||||
from unicodedata import normalize
 | 
			
		||||
from urllib.parse import quote_plus
 | 
			
		||||
from urllib.parse import quote
 | 
			
		||||
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from django.db.models import Case
 | 
			
		||||
@ -244,7 +244,7 @@ class DocumentViewSet(
 | 
			
		||||
        # RFC 5987 addresses this issue
 | 
			
		||||
        # see https://datatracker.ietf.org/doc/html/rfc5987#section-4.2
 | 
			
		||||
        filename_normalized = normalize("NFKD", filename).encode("ascii", "ignore")
 | 
			
		||||
        filename_encoded = quote_plus(filename)
 | 
			
		||||
        filename_encoded = quote(filename)
 | 
			
		||||
        content_disposition = (
 | 
			
		||||
            f"{disposition}; "
 | 
			
		||||
            f'filename="{filename_normalized}"; '
 | 
			
		||||
 | 
			
		||||
@ -455,7 +455,7 @@ CONSUMER_IGNORE_PATTERNS = list(
 | 
			
		||||
    json.loads(
 | 
			
		||||
        os.getenv(
 | 
			
		||||
            "PAPERLESS_CONSUMER_IGNORE_PATTERNS",
 | 
			
		||||
            '[".DS_STORE/*", "._*", ".stfolder/*"]',
 | 
			
		||||
            '[".DS_STORE/*", "._*", ".stfolder/*", ".stversions/*", ".localized/*", "desktop.ini"]',
 | 
			
		||||
        ),
 | 
			
		||||
    ),
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user