Skip to content

Latest commit

 

History

History
73 lines (53 loc) · 1.68 KB

socialite.md

File metadata and controls

73 lines (53 loc) · 1.68 KB

Socialite

Setup

Socialite is still in BETA.

In your settings.json file, you'll need to add the following configuration object to the actions property:

"actions": {
  "socialite": {
    "bucket": "xxxxx",
    "token": "xxxxxx"
  }
}

Usage

You can upload pictures to your bucket by sending them over by form-data :

curl -X POST -H "Content-Type: multipart/form-data; boundary=----xxxxxxxxxxxxxxxxxxxxxxxxxx"
-F "bucket=your_bucket"
-F "token=xxxxxxxxx"
-F "filename=picture"
-F "media=@picture.jpg"
"http://localhost:6060/api/v1/actions/socialite"

Options

name type required description
bucket string if not in settings.json your bucket's name
token string if not in settings.json your bucket's token
filename string × the filename to give to the post (extension is required)
media file or path × the picture to upload (you can upload as many files as you want)

Socialite-v0 (depreciated)

Setup

In your settings.json file, you'll need to add the following configuration object to the actions property:

"actions": {
  "socialite": {
    "baseURL": "http://url.com",
    "uploadRoute": "/upload.php"
  }
}

Usage

You can upload pictures via a POST request:

curl -X POST -H "Content-Type: application/json" -d '{
  "filename": "optional_file_name",
  "media": "/path/to/your/file.jpg"
  }' "http://localhost:6060/api/v1/actions/socialite"

Options

name type required description
filename string optional filename to rename your file
media path × path to your file