API
Upload
The API allows you to upload image file.
Make a POST request to the upload URI. For example:
POST https://img.eservice-hk.net/api.php?version=2
Argument | Example | Required | Description |
file |
... |
Yes | File contents via multipart/form-data . |
filename |
foo.png |
Optional | Filename of image. |
Response
{"status_code":"200","status":"ok","name":"foo.png","type":"image\/png","size":<fileSize>,"url":"https:\/\/img.eservice-hk.net\/upload\/<year>\/<month>\/<day>\/<time>_<md5FileName>"}
Field | Description |
status_code |
API response status codes |
status |
Upload status (ok / false) |
name |
File Name |
type |
File Type |
size |
File Size |
url |
A url to a image file accessible by our servers |