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.
  • more: By clicking setting button after Domain, you can custom url/folder/patterns to access picture.
    custom-host-extension-field

custom-host-extension


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

💌 Our Wechat group

↓scan the QR code below and join in the group!↓



`

评论

Your browser is out-of-date!

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

×