예제 #1
0
 def _attach_file(upload_payload, uri, index=0):
     uri = path_or_uri_to_uri(uri)
     is_path = uri.startswith("file://")
     if not is_path or config.use_path_paste:
         upload_payload["inputs"]["files_%d|url_paste" % index] = uri
     else:
         files_attached[0] = True
         path = uri[len("file://"):]
         upload_payload["files_%d|file_data" % index] = attach_file(path)
예제 #2
0
파일: staging.py 프로젝트: maikenp/galaxy
 def _attach_file(upload_payload, uri, index=0):
     uri = path_or_uri_to_uri(uri)
     is_path = uri.startswith("file://")
     if not is_path or use_path_paste:
         return {"src": "url", "url": uri}
     else:
         files_attached[0] = True
         path = uri[len("file://"):]
         upload_payload["__files"]["files_%s|file_data" %
                                   index] = self._attach_file(path)
         return {"src": "files"}