mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	tusd: Set metadata correctly in S3.
The Content-Type, Content-Disposition, StorageClass, and general metadata are not set according to our patterns by tusd; copy the file to itself to update those properties.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							287850d08d
						
					
				
				
					commit
					638c579c56
				
			@@ -87,6 +87,10 @@ def upload_content_to_s3(
 | 
			
		||||
    extra_metadata: dict[str, str] | None = None,
 | 
			
		||||
    filename: str | None = None,
 | 
			
		||||
) -> None:
 | 
			
		||||
    # Note that these steps are also replicated in
 | 
			
		||||
    # handle_upload_pre_finish_hook in zerver.views.tus, to update
 | 
			
		||||
    # properties for files uploaded via TUS.
 | 
			
		||||
 | 
			
		||||
    key = bucket.Object(path)
 | 
			
		||||
    metadata: dict[str, str] = {}
 | 
			
		||||
    if user_profile:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user