소스 검색

Making sure binary data is copied in uploadFile

Andrej Studen 5 년 전
부모
커밋
613b1c16b1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)