mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Fix: ensure document title always limited to 128 chars (#5934)
This commit is contained in:
		
							parent
							
								
									bf11dc8d1b
								
							
						
					
					
						commit
						754627681c
					
				@ -732,7 +732,7 @@ class Consumer(LoggingMixin):
 | 
			
		||||
 | 
			
		||||
        storage_type = Document.STORAGE_TYPE_UNENCRYPTED
 | 
			
		||||
 | 
			
		||||
        title = file_info.title[:127]
 | 
			
		||||
        title = file_info.title
 | 
			
		||||
        if self.override_title is not None:
 | 
			
		||||
            try:
 | 
			
		||||
                title = self._parse_title_placeholders(self.override_title)
 | 
			
		||||
@ -742,7 +742,7 @@ class Consumer(LoggingMixin):
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
        document = Document.objects.create(
 | 
			
		||||
            title=title,
 | 
			
		||||
            title=title[:127],
 | 
			
		||||
            content=text,
 | 
			
		||||
            mime_type=mime_type,
 | 
			
		||||
            checksum=hashlib.md5(self.working_copy.read_bytes()).hexdigest(),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user