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

Allow overriding MIME type, check for stdin input automatically #5

Open
mathieu-aubin opened this issue Feb 9, 2022 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@mathieu-aubin
Copy link

what if you wanted to specify mime-type upon uploading? I believe 0x0 will take whatever mime you set whem sending with -F 'file=@somefile;type=text/plain' for example.

Also, did you allow for being able to use stdin while using pipelines? -F 'file=@-' and mime can be added also, assuming a little more efforts and some descriptors redirections...

Close this at will and take care!

@mathieu-aubin
Copy link
Author

and i meant, by stdin, that a user doesnt need to specify - on the command line... essentially, the check should be donne here otherwise... what fun is it really :)

@Calinou Calinou added the enhancement New feature or request label Feb 9, 2022
@Calinou Calinou changed the title what if... Allow overriding MIME type, check for stdin input automatically Feb 9, 2022
@sumpygump
Copy link

I added the --mimetype functionality in #6

Regarding the "auto-detect" whether there is some content in stdin (and not require using - when invoking the script), I am not sure if there is a reliable way to know whether there is or will be some content coming from stdin. Currently if you invoke the script with no arguments it produces the help message, so without that, it would just sit there any wait for input (may be confusing for users). So, I think it is better to explicitly use - to indicate use stdin for the content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants