Closed beepony closed 10 years ago
This is how:
$ http example.org/path @C:\Users\beep\1.png
You'll need to update to current master though, via:
$ pip install --upgrade https://github.com/jakubroztocil/httpie/tarball/master
Thanks a lot,I just try to do it ,and it seems does'nt work .the command like this:
http -a username:password v0.api.upyun.com/file-bin @C:\Users\beep\1.png
the error info like this:
所在位置 行:1 字符: 53
+ http -a opr10000:opr10000 v0.api.upyun.com/file-bin <<<< @C:\Users\beep\1.png
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnrecognizedToken
the chinese means can not recognise the character in line 1
This is an error specific to your shell. I would guess that the @
has a special meaning for it. Try putting the path into quotes:
http -a username:password v0.api.upyun.com/file-bin '@C:\Users\beep\1.png'
Thanks a lot, I got 403 Access denied, and I checked my username and password, it's right . I was confused.
This looks like an unrelated auth issue. Make sure you have the right permissions.
(btw., I strongly advise you to change your password now as it's trivial to recover from the Authorization header that is included in the screenshot)
so kind of you, thanks again~ :)
Hi, I found the reason, file-bin is not a file, it's a bucket name.I should add an file in URI,
http -a username:password v0.api.upyun.com/file-bin/1.png '@c:\Users\beep\1.png'
Glad you have figured that out :+1:
Hi,Thanks for your httpie,it helps me a lot. Now I have a question ,eg: I have a picture in C:\Users\beep\1.png,how can I upload a file from windows platform . I don't find the right command.
Thanks and sorry for my poor English