mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Attach to release (#673)
* Moved attachaments POST url from /issues/attachments to /attachments * Implemented attachment upload on release page * Implemented downloading attachments on the release page * Added zip and gzip files to default allowed attachments * Implemented uploading attachments on edit release * Renamed UploadIssueAttachment to UploadAttachment
This commit is contained in:
		
				
					committed by
					
						
						Lunny Xiao
					
				
			
			
				
	
			
			
			
						parent
						
							dce03c19cb
						
					
				
				
					commit
					64375d875b
				
			@@ -309,7 +309,7 @@ func runWeb(ctx *cli.Context) error {
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
		})
 | 
			
		||||
		m.Post("/issues/attachments", repo.UploadIssueAttachment)
 | 
			
		||||
		m.Post("/attachments", repo.UploadAttachment)
 | 
			
		||||
	}, ignSignIn)
 | 
			
		||||
 | 
			
		||||
	m.Group("/:username", func() {
 | 
			
		||||
@@ -463,13 +463,11 @@ func runWeb(ctx *cli.Context) error {
 | 
			
		||||
			m.Get("/:id/:action", repo.ChangeMilestonStatus)
 | 
			
		||||
			m.Post("/delete", repo.DeleteMilestone)
 | 
			
		||||
		}, reqRepoWriter, context.RepoRef())
 | 
			
		||||
 | 
			
		||||
		m.Group("/releases", func() {
 | 
			
		||||
			m.Get("/new", repo.NewRelease)
 | 
			
		||||
			m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
 | 
			
		||||
			m.Post("/delete", repo.DeleteRelease)
 | 
			
		||||
		}, reqRepoWriter, context.RepoRef())
 | 
			
		||||
 | 
			
		||||
		m.Group("/releases", func() {
 | 
			
		||||
			m.Get("/edit/*", repo.EditRelease)
 | 
			
		||||
			m.Post("/edit/*", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user