Browse Source

Making sure binary data is copied in uploadFile

Andrej Studen 5 years ago
parent
commit
613b1c16b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      labkeySlicerPythonExtension/slicerNetwork.py

+ 1 - 1
labkeySlicerPythonExtension/slicerNetwork.py

@@ -462,7 +462,7 @@ class labkeyURIHandler(slicer.vtkURIHandler):
                 return False
 
         #make an URL request
-        with open(localPath, 'r') as f:
+        with open(localPath, 'rb') as f:
             data=f.read()
         remotePath=self.GetLabkeyPathFromRelativePath(relativePath)
         self.put(remotePath,data)