I’ve been trying to send an image to another server for a very long time, but for some reason it doesn’t want to accept files through requests. In the response, I get {“error”: “No panorama provided. Files = []”, “files”: []}. How do I build a request correctly? Correct code JS: https://gitlab.com/nickw1/opentrailview/blob/master/js/uploader.js Python POST code: […]
- Tags 'rb') as img_file: img = img_file.read() files = {'file': ('sor.jpg', "files": []}. How do I build a request correctly? Correct code JS: https://gitlab.com/nickw1/opentrailview/blob/master/js/uploader.js Python, {'Expires': '0'})} r = requests.post(upload_url, array $args) { $files = $req->getUploadedFiles(); $error = $warning = null; $errorCode = 400; if(!$this->authorisedToUpload(), but for some reason it doesn’t want to accept files through requests. In the response, files=files, headers=headers) print(r.text) On the other side I have this code PHP Code: private function uploadPano(Request $req, I get {"error": "No panorama provided. Files = []", I’ve been trying to send an image to another server for a very long time, image/jpeg, img), Response $res