Closed indianajava closed 3 years ago
Did you try:
xui.request(uri, query, onSuccess, onFail, null, {proxyType:"ajax", method:"post", data:{...} })
or
xui.request(uri, query, onSuccess, onFail, null, {proxyType:"fetch", method:"post", data:{...} })
in previous version (2.40), this code working properly to upload file: xui.request(uri, query, onSuccess, onFail, null, {method:"post"})
also happen at https://www.crossui.com/RAD/index.html, with image component, try to upload picture from image selector, it doesn't work
In 3.0+, you have to add the file in data object.
xui.request(uri, query, onSuccess, onFail, null, {proxyType:"ajax", method:"post", data:{ "file":xxx } })
or
xui.request(uri, query, onSuccess, onFail, null, {proxyType:"fetch", method:"post", data:{ "file":xxx } })
fetch is new feature in 3.0, what different between fetch and ajax ?
The Fetch API is a modern interface that allows you to make HTTP requests to servers from web browsers.
Only works for ES6+, and it's a recommended way to replace ajax.
On Tue, Mar 2, 2021 at 7:37 PM indianajava notifications@github.com wrote:
fetch is new feature in 3.0, what different between fetch and ajax ?
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/linb/CrossUI/issues/49#issuecomment-789329804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA63GPTB3ORGKVYMA3DQ45LTBWAGHANCNFSM4YLFZBBA .
oh thks