mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 14:42:26 -05:00 
			
		
		
		
	rework data function to provide filesize
This commit is contained in:
		
					parent
					
						
							
								7d024ce74d
							
						
					
				
			
			
				commit
				
					
						c157b1b20b
					
				
			
		
					 12 changed files with 56 additions and 57 deletions
				
			
		|  | @ -29,8 +29,9 @@ import ( | |||
| ) | ||||
| 
 | ||||
| func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) { | ||||
| 	data := func(innerCtx context.Context) (io.Reader, error) { | ||||
| 		return form.File.Open() | ||||
| 	data := func(innerCtx context.Context) (io.Reader, int, error) { | ||||
| 		f, err := form.File.Open() | ||||
| 		return f, int(form.File.Size), err | ||||
| 	} | ||||
| 
 | ||||
| 	focusX, focusY, err := parseFocus(form.Focus) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue