I want to upload two files to a web service, one CSV file with metadata inside and one tiff image. The CSV file and the tiff files are are a pair, because the CSV file contains metadata for the tiff file. So they always need to be uploaded together I have the javascript working on an uploading server
var xhr = new XMLHttpRequest();
var formData = new FormData();
xhr.open('POST', '/GigaTEMUpload/UploadFiles', true);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
files.forEach(function (file, i) {
formData.append('uploadFiles[' + i + ']', file);
});
xhr.send(formData);
but if I want to use python request to do the same post job how to do it through python? Thanks
I am using python from a server running spyder to upload two files to a web. And once they are uploaded the tiff image would be viewable on the web.