mirror of
https://github.com/curlconverter/curlconverter.git
synced 2022-05-22 02:35:29 +03:00
13 lines
295 B
Python
13 lines
295 B
Python
import requests
|
|
|
|
headers = {
|
|
'Authorization': 'Bearer ACCESS_TOKEN',
|
|
}
|
|
|
|
files = [
|
|
('attributes', '{"name":"tigers.jpeg", "parent":{"id":"11446498"}}'),
|
|
('file', open('myfile.jpg', 'rb')),
|
|
]
|
|
|
|
requests.post('https://upload.box.com/api/2.0/files/content', headers=headers, files=files)
|