Open susanodd opened 1 month ago
Is this for Glos Video, NMM video and voorbeeldzinnen? Can I have a link to example API template how to upload left and right video?
This is for the perspective videos. @Woseseltops wants to do this one. :)
I kinda like the approach where we just add extra parameters to the existing video upload end point. @rem0g , can I get your approval before I implement?
url = 'http://54.93.111.92/dictionary/api_update_gloss/14/video'
# The path to your video file
left_video_file_path = 'left_video.mp4'
right_video_file_path = 'right_video.mp4'
# Auth
headers = {'Authorization': f'Bearer {BEARER_TOKEN}'}
# Open the video file in binary mode and send it in a POST request
files = {'left': open(left_video_file_path, 'rb'),
'right': open(right_video_file_path, 'rb')}
response = requests.post(url, files=files, headers=headers)
Yes, perfect!
This can be implemented now. The models are in the master branch.
The only arguments needed by the API are the gloss id, the video, and "left" or "right"