S.EE Docs
API 參考

替換檔案

以新檔案替換既有檔案的內容,短網址與檔案網址維持不變。

POST
/api/v1/file/replace

Header Parameters

Authorization*string

API key

Request Body

multipart/form-data
  1. body
file*file

The new file. The key should be 'file' (alias 'smfile').

Formatbinary
file_id*integer

ID of the file to replace (the file_id returned by the upload API).

Response Body

OK

application/json
  1. response
code?integer

Response status code (200 indicates success)

data?

File upload response

message?string

Human-readable status message

Example Request
curl -X POST 'https://s.ee/api/v1/file/replace' \  -H 'Authorization: string' \  -F 'file=string' \  -F 'file_id=0'
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"}