Hi, i got a problem with upload images in dropbox. Check my code
Other files are transmitted and i can read after upload in dropbox.
But in images files written 'This file is not available for preview.'
[Cross-linking for reference: https://stackoverflow.com/questions/53488348/image-brokes-when-i-upload-files-with-http ]
You're using the "files" parameter in the Python requests library "post" method, which seems to be for "multipart encoding upload". The Dropbox API /2/files/upload endpoint does not use multipart encoding upload, however, and instead just expects the raw file content to be sent in the request body (to match the "Content-Type: application/octet-stream").
Update your code to use the "data" parameter to send the file data in the request body instead.