diff --git a/docs/docs/en.md b/docs/docs/en.md index d89a58d..111845d 100644 --- a/docs/docs/en.md +++ b/docs/docs/en.md @@ -377,6 +377,31 @@ The `name` attribute of the input tag +### custom-action + +Custom upload method + +* **Type:** `async Function` + +* **Default:** `undefined` + +* **Details:** + + `custom-action` priority than `put-action, post-action` + +* **Usage:** + ```html + + ``` + ```js + async function customAction(file, component) { + // return component.uploadPut(file) + return component.uploadHtml4(file) + } + ``` + + + ### headers @@ -1445,4 +1470,4 @@ Per second upload speed * **Default:** `undefined` -* **Browser:** `= IE9` \ No newline at end of file +* **Browser:** `= IE9` diff --git a/docs/docs/zh-cn.md b/docs/docs/zh-cn.md index fdbe047..787ac3f 100644 --- a/docs/docs/zh-cn.md +++ b/docs/docs/zh-cn.md @@ -297,6 +297,29 @@ input标签的 `name` 属性 +### custom-action + +自定义上传方法 + +* **类型:** `async Function` + +* **默认值:** `undefined` + +* **详细:** + + `custom-action` 优先级高于 `put-action, post-action` + +* **示例:** + ```html + + ``` + ```js + async function customAction(file, component) { + // return component.uploadPut(file) + return component.uploadHtml4(file) + } + ``` + ### headers