Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to decode 'Data' field as base64 #2520

Merged
merged 3 commits into from
Apr 5, 2016
Merged

Add option to decode 'Data' field as base64 #2520

merged 3 commits into from
Apr 5, 2016

Conversation

slothbag
Copy link

@slothbag slothbag commented Apr 2, 2016

This is my first crack at go code.. so feel free to criticize and make suggestions.

My goal here is to retain the current ipfs object put logic, but allow a --datafieldenc argument which accepts "text" ot "base64". Default is "text" to retain previous functionality. Then I can upload raw binary data using --datafieldenc base64 and a base64 encoded data field.

Reference Issue #1582

@GitCop
Copy link

GitCop commented Apr 2, 2016

There were the following issues with your Pull Request

  • Commit: 341a7b3
    • Invalid signoff. Commit message must end with
      License: MIT
      Signed-off-by: .* <.*>

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

License: MIT
Signed-off-by: slothbag@gmail.com <slothbag@gmail.com>
@@ -342,6 +344,7 @@ And then run:
},
Options: []cmds.Option{
cmds.StringOption("inputenc", "Encoding type of input data, either \"protobuf\" or \"json\"."),
cmds.StringOption("datafieldenc", "Encoding type of the data field, either \"text\" or \"base64\"."),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add .Default("text") to the end of this option, so you don't have to do the !found check later

slothbag added 2 commits April 4, 2016 13:09
License: MIT
Signed-off-by: slothbag <slothbag@gmail.com>
License: MIT
Signed-off-by: slothbag <slothbag@gmail.com>
@whyrusleeping
Copy link
Member

cool, lgtm!

@whyrusleeping whyrusleeping merged commit ae3fed7 into ipfs:master Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants