diff options
author | Louis Holbrook <nolash@users.noreply.github.com> | 2017-04-06 20:21:16 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-04-06 20:21:16 +0800 |
commit | 0ec1104ba92c226c279389bbeb88ca515208f030 (patch) | |
tree | de5d5d03371702e5f9bb248c4b9f1a1289cf1876 /cmd/swarm/main.go | |
parent | c76ad944920300be58446ddd1a50c8d693957774 (diff) | |
download | dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar.gz dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar.bz2 dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar.lz dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar.xz dexon-0ec1104ba92c226c279389bbeb88ca515208f030.tar.zst dexon-0ec1104ba92c226c279389bbeb88ca515208f030.zip |
cmd/swarm: allow uploading from stdin (#3744)
- intended to be a swarm alternative to termbin.com
- added --stdin flag to swarm executable. if set, swarm will
read data from stdin and postRaw it.
Diffstat (limited to 'cmd/swarm/main.go')
-rw-r--r-- | cmd/swarm/main.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/swarm/main.go b/cmd/swarm/main.go index 731c300f8..47ed662d4 100644 --- a/cmd/swarm/main.go +++ b/cmd/swarm/main.go @@ -112,6 +112,14 @@ var ( Name: "defaultpath", Usage: "path to file served for empty url path (none)", } + SwarmUpFromStdinFlag = cli.BoolFlag{ + Name: "stdin", + Usage: "reads data to be uploaded from stdin", + } + SwarmUploadMimeType = cli.StringFlag{ + Name: "mime", + Usage: "force mime type", + } CorsStringFlag = cli.StringFlag{ Name: "corsdomain", Usage: "Domain on which to send Access-Control-Allow-Origin header (multiple domains can be supplied separated by a ',')", @@ -244,6 +252,8 @@ Cleans database of corrupted entries. SwarmRecursiveUploadFlag, SwarmWantManifestFlag, SwarmUploadDefaultPath, + SwarmUpFromStdinFlag, + SwarmUploadMimeType, } app.Flags = append(app.Flags, debug.Flags...) app.Before = func(ctx *cli.Context) error { |