API 參考
上傳檔案
上傳檔案並產生可分享的短網址,支援設定密碼與過期時間。
POST
Upload a file using multipart/form-data. The file field is required, domain, custom_slug, and is_private are optional.
multipart/form-data- body
custom_slug?stringYour preferred custom slug (e.g., 'my-link'). If not provided, a random slug will be generated.
domain?stringThe domain to be used for the short link.
file*fileThe file to be uploaded (alias 'smfile')
Format
binaryis_private?integerWhether this file should be private (0 = public, 1 = private).
Default
0Value in
01OK
application/json- response
code?integerResponse status code (200 indicates success)
data?File upload response
message?stringHuman-readable status message
curl -X POST 'https://s.ee/api/v1/file/upload' \ -H 'Authorization: string' \ -F 'file=string'Example Response200
{ "code": 0, "data": { "created_at": 0, "delete": "string", "file_id": 0, "filename": "string", "hash": "string", "height": 0, "mime_type": "string", "page": "string", "path": "string", "size": 0, "storename": "string", "thumb_url": "string", "upload_status": 0, "url": "string", "width": 0 }, "message": "string"}