Upload the file from the device to Vertopal.
Loading, Please Wait...
Upload the file from the device to Vertopal.
The field that sends the file.
The value of this field is the local file path in the device.
POST https://api.vertopal.com/v1/upload/file
Authorization: Bearer [APP_TOKEN]
data={
"app": "[APP_ID]"
}
file=@"/path/to/sample.png"
curl -L -X POST 'https://api.vertopal.com/v1/upload/file' \
-H 'Authorization: Bearer [APP_TOKEN]' \
-F 'data={
"app": "[APP_ID]"
}'
-F 'file=@"/path/to/sample.png"'
vertopal api -v 1 upload/file \
--app "[APP_ID]" \
--token "[APP_TOKEN]" \
-F data='{
"app": "%app-id%"
}'
file='@/path/to/sample.png'
from vertopal.api.v1 import API
API.upload(
filename="sample.png",
filepath="/path/to/sample.png",
app="[APP_ID]",
token="[APP_TOKEN]",
)
use Vertopal\API\Credential;
use Vertopal\API\V1;
require "vendor/autoload.php";
$credential = new Credential("[APP_ID]", "[APP_TOKEN]");
V1::upload(
"sample.png",
"/path/to/sample.png",
$credential
);
The connector for connecting to another task as the data key.
The original name of the uploaded file.
The original size of the uploaded file in bytes.
When the uploaded file will be deleted from the Vertopal.
The task has been executed successfully without any errors.
The submitted file is empty.
The max size of the file is [MAXSIZE] KB; the current is [FILESIZE] KB.
File extension [EXTENSION] is not valid.
The only file with the registered hash is allowed in development.
{
"result": {
"output": {
"connector": "[CONNECTOR]",
"name": "sample.png",
"size": 391517,
"expires_at": "2023-03-24 05:47:02"
},
"error": {},
"warning": {}
}
}