mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 09:31:53 +01:00 
			
		
		
		
	#2842 add quotes to attachment file name
This commit is contained in:
		
							parent
							
								
									b1d41cfa60
								
							
						
					
					
						commit
						dd36c431ec
					
				| @ -25,7 +25,7 @@ func ServeData(ctx *context.Context, name string, reader io.Reader) error { | ||||
| 	if !isTextFile { | ||||
| 		_, isImageFile := base.IsImageFile(buf) | ||||
| 		if !isImageFile { | ||||
| 			ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+path.Base(ctx.Repo.TreeName)) | ||||
| 			ctx.Resp.Header().Set("Content-Disposition", "attachment; filename=\""+path.Base(ctx.Repo.TreeName)+"\"") | ||||
| 			ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") | ||||
| 		} | ||||
| 	} else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user