feat: add chunk file upload

This commit is contained in:
yangshangbo
2025-07-10 10:03:57 +08:00
parent 684866baa6
commit d59c268492
15 changed files with 2394 additions and 13 deletions
+4 -4
View File
@@ -187,12 +187,12 @@ pub fn (mut c Context) file_with_options(file_path string, options FileOptions)
// FileOptions struct for configuring file serving
pub struct FileOptions {
pub:
status_code int = 0 // 自定义状态码,0表示使用默认200
content_type string = '' // 自定义Content-Type
status_code int // 自定义状态码,0表示使用默认200
content_type string // 自定义Content-Type
last_modified bool = true // 是否设置Last-Modified头
etag bool = true // 是否设置ETag头
max_age int = 0 // 缓存时间(秒)
no_cache bool = false // 是否禁用缓存
max_age int // 缓存时间(秒)
no_cache bool // 是否禁用缓存
headers map[string]string // 自定义响应头
}