
请求地址：
const baseUrl = 'https://bowongai-test--text-video-agent-fastapi-app.modal.run';
const url = `${baseUrl}/api/file/upload/s3`;


```实例代码
 async upload(params: UploadParams): Promise<string> {
    const { filePath, name, type, onProgress } = params;
    const url = `${this.baseUrl}/api/file/upload/s3`;

    try {
      // 获取文件信息
      const fileInfo = await Taro.getFileInfo({ filePath });
      if (!isGetFileInfoSuccessCallbackResult(fileInfo)) {
        throw new Error(fileInfo.errMsg)
      }
      // 自动生成文件名（如果未提供）
      const fileName = name || `upload_${Date.now()}.${this._getFileExtension(filePath)}`;

      // 自动判断文件类型（如果未提供）
      const fileType = type || this._getMimeType(filePath);

      console.log('开始上传文件:', {
        fileName,
        fileSize: fileInfo.size,
        fileType
      });

      // 使用 Taro.uploadFile 进行文件上传
      const response = await new Promise<Taro.uploadFile.SuccessCallbackResult>((resolve, reject) => {
        const uploadTask = Taro.uploadFile({
          url,
          filePath,
          name: 'file', // 服务端接收的字段名
          header: {
            'Accept': 'application/json'
          },
          formData: {
            filename: fileName,
            type: fileType
          },
          success: resolve,
          fail: reject
        });

        // 监听上传进度
        if (onProgress) {
          uploadTask.progress((res) => {
            const progress = Math.round((res.totalBytesSent / res.totalBytesExpectedToSend) * 100);
            onProgress(progress);
          });
        }
      });

      // 检查 HTTP 状态码
      if (response.statusCode !== 200) {
        throw new Error(`HTTP ${response.statusCode}: 文件上传失败`);
      }

      // 解析响应数据
      let result: ApiResponse<string>;
      try {
        result = JSON.parse(response.data) as ApiResponse<string>;
      } catch (parseError) {
        throw new Error('服务器响应格式错误');
      }

      // 检查业务状态码
      if (!result.status) {
        throw new Error(result.msg || '文件上传失败');
      }

      console.log('文件上传成功:', result.data);
      return result.data;

    } catch (error) {
      console.error('文件上传失败:', error);
      throw error;
    }
  }
```