0x0
0x0 copied to clipboard
Allow overriding MIME type, check for stdin input automatically
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!
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 :)
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.