初始化 PDF 上传
curl --request POST \
--url https://bptest.mapleai.cc/api/open/uploads/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>",
"file_size": 123,
"file_md5": "<string>",
"strategy": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/open/uploads/init"
payload = {
"file_name": "<string>",
"file_size": 123,
"file_md5": "<string>",
"strategy": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_name: '<string>',
file_size: 123,
file_md5: '<string>',
strategy: '<string>'
})
};
fetch('https://bptest.mapleai.cc/api/open/uploads/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 0,
"message": "操作成功",
"data": {},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}开放接口 / Open Uploads
初始化 PDF 上传
POST
/
api
/
open
/
uploads
/
init
初始化 PDF 上传
curl --request POST \
--url https://bptest.mapleai.cc/api/open/uploads/init \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file_name": "<string>",
"file_size": 123,
"file_md5": "<string>",
"strategy": "<string>"
}
'import requests
url = "https://bptest.mapleai.cc/api/open/uploads/init"
payload = {
"file_name": "<string>",
"file_size": 123,
"file_md5": "<string>",
"strategy": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file_name: '<string>',
file_size: 123,
file_md5: '<string>',
strategy: '<string>'
})
};
fetch('https://bptest.mapleai.cc/api/open/uploads/init', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 0,
"message": "操作成功",
"data": {},
"timestamp": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json