Example uploading file using tauri http #3253
Replies: 5 comments 3 replies
-
the Cargo feature |
Beta Was this translation helpful? Give feedback.
-
I have the same issue when I try to upload file using tauri http. See also my changes on liudonghua123/hoppscotch-app@89ec049#diff-fed4d80eba86a6e74eb47907f2dead6d37714c1895af8e2ff3ee52ec60b0cea3. |
Beta Was this translation helpful? Give feedback.
-
Do not pass file path to the file key, you need to pass file's content ie. Uint8Array |
Beta Was this translation helpful? Give feedback.
-
This example works:
|
Beta Was this translation helpful? Give feedback.
-
Hello, curl -i -X POST \
-H "Authorization: Bearer xxxxxxx" \
-F "fileup=@/path/to/my/file
<my-endpoint-url> I'm getting the same results when using tauri's const body = Body.from({
fileup: {
file: "/path/to/my/file"
}
}) or const body = Body.from({
fileup: {
file: await readBinaryFile("/path/to/my/file")
}
}) What am I missing? Any suggestions what else I could look at? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
Does anyone have an example of how to upload a file using the taurl http api? trying currently and failing
this.form.fileData is provided by a html file input, thanks!
Beta Was this translation helpful? Give feedback.
All reactions