mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 22:06:38 +08:00
53 lines
2.6 KiB
Go
53 lines
2.6 KiB
Go
/*
|
|
Copyright 2025 linux.do
|
|
Modified by Arctel.net, 2026
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package upload
|
|
|
|
const (
|
|
ErrNoFileSelected = "请选择要上传的文件"
|
|
ErrInvalidUploadType = "无效的上传类型"
|
|
ErrFileTooLarge = "图片大小不能超过 2MB"
|
|
ErrUnsupportedFormat = "只支持 JPG、PNG、WEBP 格式的图片"
|
|
ErrInvalidImage = "无效的图片文件"
|
|
ErrUploadExtensionsNotConfigured = "上传扩展名未配置"
|
|
ErrProcessFileFailed = "处理文件失败"
|
|
ErrSaveFileFailed = "保存文件失败"
|
|
ErrOpenFileFailed = "打开文件失败"
|
|
ErrInvalidFilePath = "非法文件路径"
|
|
ErrSaveUploadRecordFailed = "保存上传记录失败"
|
|
ErrQueryHistoryUploadFailed = "查询历史上传记录失败"
|
|
ErrGenericFileTooLarge = "文件大小不能超过 32MB"
|
|
ErrFileContentExtensionMismatch = "文件内容与扩展名不匹配,可能包含安全风险"
|
|
ErrFileValidationFailed = "文件校验失败"
|
|
ErrInvalidMetadataJSON = "元数据 JSON 格式不合法"
|
|
ErrInvalidFileID = "无效的文件 ID"
|
|
ErrQueryUploadRecordFailed = "查询文件记录失败"
|
|
ErrInvalidBatchDownloadRequest = "参数绑定失败,请传入有效的文件 ID 数组"
|
|
ErrInvalidIDValueFormat = "无效的 ID 值: %s"
|
|
ErrRetrieveUploadRecordsFailed = "检索文件记录失败"
|
|
ErrNoValidFilesForArchive = "没有找到任何有效的文件记录进行打包"
|
|
ErrInvalidParams = "参数错误"
|
|
ErrQueryFileCountFailed = "查询文件数量失败"
|
|
ErrQueryFileListFailed = "查询文件列表失败"
|
|
ErrDeleteFileFailed = "删除文件失败"
|
|
ErrS3KeyRequired = "s3 key must not be empty"
|
|
ErrS3KeyTooLongFormat = "s3 key exceeds maximum length of %d"
|
|
ErrS3KeyStartsWithSlash = "s3 key must not start with /"
|
|
ErrS3KeyContainsNullBytes = "s3 key must not contain null bytes"
|
|
ErrQueryUnusedUploadsFailed = "查询未使用的上传文件失败: %w"
|
|
)
|