uPic tutorial - custom



🇨🇳中文 | 🇬🇧English

custom config

📝 Options instruction

  • API URL: Background service URL
  • Request method: The service request mode, support POST and PUT
  • File field: The field name of the file object in the upload form
  • Other field: Request Body。Click the other field buttons to configure
  • Request header: Request Headers。Click the other field buttons to configure
  • URL path: The path to get the image URL in the JSON returned by the upload.Rule of get URL
  • Domain: After uploading, access the URL of the server file.
  • Save Key: The path to file storage (including folders). Supports {year} {month} {day} {hour} {minute} {second} {since_second} {since_millisecond} {random} {filename} {.suffix} and etc. For example, the uploaded file is uPic.jpg, set to \"uPic/{filename}{.suffix}\", it will be saved as: uPic/uPic.jpg.
  • The after Save Key input is Suffix: This will be used for custom picture processor.
    custom-host-extension-field

Rule of get URL

  • Example:
1
2
3
4
5
6
{
"data": "http://xxx.png"
}

# get
["data"]
  • Example:
1
2
3
4
5
6
7
{
"data": {
"url": "http://xxx.png"
}
}
# get
["data", "url"]
  • Example:
1
2
3
4
5
6
7
8
9
10
{
"data": {
"url": [
"http://xxx.png"
]
}
}

# get
["data", "url", 0]
  • Example:
1
2
3
4
5
6
7
8
9
10
{
"data": [
{
"url": "http://xxx.png"
}
]
}

# get
["data", 0, "url"]

🏷 Dynamic template value

Both the extended fields and the request headers support the following dynamic templates to get dynamic values

  • {filename}:Will be dynamically replaced with the file name at the time of upload
    `
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×