Interface IUploadFileOptions

Hierarchy

  • IBaseUploadFileOptions
    • IUploadFileOptions

Properties

file?: File

@Multi_Lang_Tag

Locale

cn JS 的 File 对象。

浏览器专用

Locale

Locale

en File object of JS

Browser specific

Locale

fileInput?: string | HTMLInputElement

Deprecated

Use file instead.

@Multi_Lang_Tag

Locale

cn 存储文件的 DOM 元素,与上面的 file 只要选填一个就可以了。

浏览器专用

如果传字符串,最后会以 document.getElementById('fileInput').files[0] 拿到 File 对象 如果传的是 DOM 节点,最后以 fileInput.files[0] 拿到 File 对象

Locale

Locale

en The DOM element that stores the file

Browser specific, about to be deprecated

If you pass a string, you will finally get the File object with document.getElementById('fileInput').files[0] If the DOM node is passed, finally get the File object with fileInput.files[0]

Locale

filePath?: string

@Multi_Lang_Tag

Locale

cn 临时文件路径

uni-app,RN,小程序等特殊的 JS 运行环境专用(chooseImage 拿到的临时路径)

Locale

Locale

en Temporary file path

uni-app, RN, applet, and other special JS runtime environment dedicated (temporary path obtained by chooseImage)

Locale

maxSize?: number

@Multi_Lang_Tag

Locale

cn maxSize 限制文件大小。

只对浏览器生效。

uni-app,小程序等,由于sdk只能得到一个 filePath 临时路径,不能得到整个文件的信息。 所以请开发者自行在选择文件后进行判断,参考那些端的API如 wx.chooseImage,uni.chooseImage

Locale

Locale

en maxSize : maximum file size.

Only valid for browsers.

For uni-app, applet, etc., because the SDK can only get a temporary filePath path, the information of the entire file cannot be obtained. So please make your determination after selecting the file. Refer to those frame/platform’s APIs such as wx.chooseImage, uni.chooseImage.

Locale

nosScenes?: string

@Multi_Lang_Tag

Locale

cn 存储场景,不传默认实例化配置,默认为"im"

Locale

Locale

en Storage scene (default: instantiation configuration, i.e., "im")

Locale

nosSurvivalTime?: number

@Multi_Lang_Tag

Locale

cn 存储有效时间,不传则默认实例化配置

不得小于一天,单位秒

Locale

Locale

en Storage valid time (default: instantiation configuration)

Cannot be less than one day (unit: second)

Locale

onUploadProgress?: ((obj) => void)

Type declaration

    • (obj): void
    • @Multi_Lang_Tag

      Parameters

      • obj: FileProgressObject

      Returns void

      Locale

      cn 上传进度

      Locale

      Locale

      en Upload progress

      Locale

type?: "image" | "audio" | "video" | "file"

@Multi_Lang_Tag

Locale

cn 文件类型

Locale

Locale

en File type

Locale

Generated using TypeDoc