Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
1b50fcef
Commit
1b50fcef
authored
Aug 01, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
default add progress to false, unless using CLI
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
149819f8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
core/commands/add.go
core/commands/add.go
+6
-1
test/sharness/t0040-add-and-cat.sh
test/sharness/t0040-add-and-cat.sh
+1
-1
No files found.
core/commands/add.go
View file @
1b50fcef
...
...
@@ -68,7 +68,7 @@ You can now refer to the added file in a gateway, like so:
cmds
.
OptionRecursivePath
,
// a builtin option that allows recursive paths (-r, --recursive)
cmds
.
BoolOption
(
quietOptionName
,
"q"
,
"Write minimal output."
)
.
Default
(
false
),
cmds
.
BoolOption
(
silentOptionName
,
"Write no output."
)
.
Default
(
false
),
cmds
.
BoolOption
(
progressOptionName
,
"p"
,
"Stream progress data."
)
.
Default
(
true
)
,
cmds
.
BoolOption
(
progressOptionName
,
"p"
,
"Stream progress data."
),
cmds
.
BoolOption
(
trickleOptionName
,
"t"
,
"Use trickle-dag format for dag generation."
)
.
Default
(
false
),
cmds
.
BoolOption
(
onlyHashOptionName
,
"n"
,
"Only chunk and hash - do not write to disk."
)
.
Default
(
false
),
cmds
.
BoolOption
(
wrapOptionName
,
"w"
,
"Wrap files with a directory object."
)
.
Default
(
false
),
...
...
@@ -81,6 +81,11 @@ You can now refer to the added file in a gateway, like so:
return
nil
}
_
,
found
,
_
:=
req
.
Option
(
progressOptionName
)
.
Bool
()
if
!
found
{
req
.
SetOption
(
progressOptionName
,
true
)
}
sizeFile
,
ok
:=
req
.
Files
()
.
(
files
.
SizeFile
)
if
!
ok
{
// we don't need to error, the progress bar just won't know how big the files are
...
...
test/sharness/t0040-add-and-cat.sh
View file @
1b50fcef
...
...
@@ -343,7 +343,7 @@ test_add_cat_5MB
test_add_cat_expensive
test_add_named_pipe
" Post http://
$API_ADDR
/api/v0/add?encoding=json&r=true&stream-channels=true:"
test_add_named_pipe
" Post http://
$API_ADDR
/api/v0/add?encoding=json&
progress=true&
r=true&stream-channels=true:"
test_kill_ipfs_daemon
...
...
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