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"
}
}
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"
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) |
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"
}
}
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"
name | type | required | description |
---|---|---|---|
filename | string |
− | optional filename to rename your file |
media | path |
× | path to your file |