def robotupload(self, req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' http://cdsweb.cern.ch/batchuploader/robotupload -A invenio_webupload
     """
     argd = wash_urlargd(form, {'file': (Field, None),
                                'mode': (str,None)})
     cli_upload(req, argd['file'], argd['mode'])
 def robotupload(self, req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' [-F 'callback_url=http://...' http://cdsweb.cern.ch/batchuploader/robotupload] -A invenio_webupload
     """
     argd = wash_urlargd(form, {
         'mode': (str, None),
         'callback_url': (str, None)
     })
     cli_upload(req, form.get('file', None), argd['mode'],
                argd['callback_url'])
 def restupload(req, form):
     """Interface for robots used like this:
         $ curl --data-binary '@localfile.xml' http://cds.cern.ch/batchuploader/robotupload/[insert|replace|correct|append]?[callback_url=http://...]&nonce=1234 -A invenio_webupload
     """
     filepath, mimetype = handle_file_post(req)
     argd = wash_urlargd(form, {'callback_url': (str, None), 'nonce': (str, None), 'special_treatment': (str, None)})
     return cli_upload(req, open(filepath), '--' + path[0], argd['callback_url'], argd['nonce'], argd['special_treatment'])
 def restupload(req, form):
     """Interface for robots used like this:
         $ curl --data-binary '@localfile.xml' http://cdsweb.cern.ch/batchuploader/robotupload/[insert|replace|correct|append]?[callback_url=http://...]&nonce=1234 -A invenio_webupload
     """
     filepath, mimetype = handle_file_post(req)
     argd = wash_urlargd(form, {'callback_url': (str, None), 'nonce': (str, None), 'special_treatment': (str, None)})
     return cli_upload(req, open(filepath), '--' + path[0], argd['callback_url'], argd['nonce'], argd['special_treatment'])
Beispiel #5
0
 def legacyrobotupload(req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' [-F 'callback_url=http://...'] [-F 'nonce=1234'] http://cds.cern.ch/batchuploader/robotupload -A invenio_webupload
     """
     argd = wash_urlargd(
         form, {
             'mode': (str, None),
             'callback_url': (str, None),
             'nonce': (str, None),
             'special_treatment': (str, None)
         })
     return cli_upload(req, form.get('file', None), argd['mode'],
                       argd['callback_url'], argd['nonce'],
                       argd['special_treatment'])
 def legacyrobotupload(req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' [-F 'callback_url=http://...'] [-F 'nonce=1234'] http://cds.cern.ch/batchuploader/robotupload -A invenio_webupload
     """
     argd = wash_urlargd(
         form,
         {
             "mode": (str, None),
             "callback_url": (str, None),
             "nonce": (str, None),
             "special_treatment": (str, None),
         },
     )
     return cli_upload(
         req,
         form.get("file", None),
         argd["mode"],
         argd["callback_url"],
         argd["nonce"],
         argd["special_treatment"],
     )
Beispiel #7
0
 def robotupload(self, req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' http://cdsweb.cern.ch/batchuploader/robotupload -A invenio_webupload
     """
     argd = wash_urlargd(form, {'file': (Field, None), 'mode': (str, None)})
     cli_upload(req, argd['file'], argd['mode'])
 def robotupload(self, req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' [-F 'callback_url=http://...' http://cdsweb.cern.ch/batchuploader/robotupload] -A invenio_webupload
     """
     argd = wash_urlargd(form, {"mode": (str, None), "callback_url": (str, None)})
     cli_upload(req, form.get("file", None), argd["mode"], argd["callback_url"])
 def legacyrobotupload(req, form):
     """Interface for robots used like this:
         $ curl -F '[email protected]' -F 'mode=-i' [-F 'callback_url=http://...'] [-F 'nonce=1234'] http://cds.cern.ch/batchuploader/robotupload -A invenio_webupload
     """
     argd = wash_urlargd(form, {'mode': (str, None), 'callback_url': (str, None), 'nonce': (str, None), 'special_treatment': (str, None)})
     return cli_upload(req, form.get('file', None), argd['mode'], argd['callback_url'], argd['nonce'], argd['special_treatment'])