mirror of
				https://github.com/cloudreve/cloudreve.git
				synced 2025-10-31 08:39:10 +08:00 
			
		
		
		
	Feat: use goroutine to detect upload-canceling action / Object name validate
This commit is contained in:
		| @ -24,12 +24,14 @@ func (handler Handler) Put(ctx context.Context, file io.ReadCloser, dst string) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	// 创建目标文件 | ||||
| 	out, err := os.Create(dst) | ||||
| 	if err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| 	defer out.Close() | ||||
|  | ||||
| 	// 写入文件内容 | ||||
| 	_, err = io.Copy(out, file) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 HFO4
					HFO4