Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
9d4d0250
Commit
9d4d0250
authored
May 27, 2021
by
Markus Scheidgen
Browse files
Fixed upload curl commands.
parent
e351485d
Changes
2
Hide whitespace changes
Inline
Side-by-side
gui/src/components/uploads/UploadPage.js
View file @
9d4d0250
...
...
@@ -353,8 +353,8 @@ class UploadPage extends React.Component {
\`\`\`
### Form data vs. streaming
NOMAD accepts stream data
(
\`
-T <local_file>
\`
)
(like in the
examples above) or multi-part form data
(
\`
-X PUT -
f
file=@<local_file>
\`
)
:
NOMAD accepts stream data
\`
-T <local_file>
\`
(like in the
examples above) or multi-part form data
\`
-X PUT -
F
file=@<local_file>
\`
:
\`\`\`
${
uploadCommand
.
upload_command_form
}
\`\`\`
...
...
@@ -363,8 +363,8 @@ class UploadPage extends React.Component {
more information (e.g. the file name) to our servers (see below).
#### Upload names
With multi-part form data
(
\`
-X PUT -
f
file=@<local_file>
\`
)
, your upload will
be named after the file by default. With stream data
(
\`
-T <local_file>
\`
)
With multi-part form data
\`
-X PUT -
F
file=@<local_file>
\`
, your upload will
be named after the file by default. With stream data
\`
-T <local_file>
\`
there will be no default name. To set a custom name, you can use the URL
parameter
\`
name
\`
:
\`\`\`
...
...
nomad/app/flask/api/upload.py
View file @
9d4d0250
...
...
@@ -615,10 +615,10 @@ class UploadCommandResource(Resource):
upload_command_form
=
'curl "%s" -X PUT -F file=@<local_file>'
%
upload_url
upload_command_with_name
=
'curl "%s"
-X PUT
-T <local_file>'
%
upload_url_with_name
upload_command_with_name
=
'curl "%s" -T <local_file>'
%
upload_url_with_name
upload_progress_command
=
upload_command
+
' | xargs echo'
upload_tar_command
=
'tar -cf - <local_folder> | curl
-# -H
"%s" -T - | xargs echo'
%
upload_url
upload_tar_command
=
'tar -cf - <local_folder> | curl "%s" -T - | xargs echo'
%
upload_url
return
dict
(
upload_url
=
upload_url
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment