1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-26 05:37:27 +02:00
Vitaly the Alpaca (bot) 67a7544520 Main build (Jenkins)
2024-09-24 15:43:51 +03:00

1.1 KiB

sidebar_position
1

Upload file

Upload single file to Neocities

Function UploadFile(Val Token, Val Path, Val Data) Export

Parameter CLI option Type Description
Token --token String Auth token
Path --path String File path on Neocities
Data --file String, BinaryData URL, path or file data

Returns: Map Of KeyAndValue - Serialized JSON response from Neocities


:::tip Neocities API docs: neocities.org/api :::

    Token = "7419cd51de4037f7...";
    Data  = "https://openintegrations.dev/test_data/picture.jpg"; // URL, Path or Binary Data
    Path  = "testfolder/test_pic.png";

    Result = OPI_Neocities.UploadFile(Token, Path, Data);
    
  oint neocities UploadFile --token "7419cd51de4037f7..." --path %path% --file "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"

{
 "result": "success",
 "message": "your file(s) have been successfully uploaded"
}