Upload an image to the specified website's API endpoint

api /tmp/files - API

Method: POST

Params: file=/path/to/test.jpg

URL: https://tmpfiles.org/api/v1/upload

Example with CURL:

curl -F “file=@/Users/myuser/test.jpg” https://tmpfiles.org/api/v1/upload

I get the file location from filetools path from uri through Activity starter
don’t know how to upload

I tried I got this Response

{
“status”: “success”,
“data”: {
“url”: “/tmp/files - component_event.png
}
}

can you share blocks screenshot

It looks like you uploaded the file successfully… so what is the question?

Taifun

I test this using api test application

but the web component in Kodular does not support form-data

Use the web component and show us a screenshot of your relevant blocks
Here is a Dropbox exsmple App Inventor Tutorials and Examples: Dropbox | Pura Vida Apps

Taifun

Error:1104

Try it without request header and show us the response content from the Web.GotText event after trying to upload

Taifun

same error

Also what about providing a screenshot of your updated relevant blocks?

Taifun

updated block

I now tested this myself on App Inventor, this was the result

unknown

unfortunately the API documentation is very sparse…
does the API use multipart/form-data?
if yes, this is not supported by the web component

you might want to try the webviewer

Taifun

i try this