Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Filenames with spaces fail on upload. #3

Closed
wink opened this Issue · 3 comments

4 participants

@wink

Uploading a file with a space in its filename returns an error after upload is complete:

$ geturl ~/Documents/insurance\ claim.txt

Uploading the file to Filepicker.io...
######################################################################## 100.0%
curl: (6) Could not resolve host: claim.txt; nodename nor servname provided, or not known
Traceback (most recent call last):
File "/usr/local/bin/geturl", line 56, in
{"filename": sys.argv[1], "apikey": APIKEY, "fpurl": FPURL}, shell=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'curl --progress-bar -F "fileUpload=@/Users/wink/Documents/insurance claim.txt" -F "apikey=Au2fZ0IXMQguEemJ1bb4_z" https://www.filepicker.io/api/path/storage//Users/wink/Documents/insurance claim.txt' returned non-zero exit status 6

Awesome tool, by the way. +1 on a brew install.

@yonson2

I also get errors when uploading files with non-alfanumeric characters, such as [foo]__bar.txt.

@uams
Owner

Yeah. I should be url encoding.

@dideler dideler referenced this issue from a commit
@dideler dideler Fixes #3 (filenames with spaces) and use positional arguments in stri…
…ng format() for Python 2.6
308e19c
@dideler

First reference (4c50578) is just this fix on the master branch. Second reference (308e19c) is from a branch where I also made other changes.

@uams uams closed this in 4c50578
@joidegn joidegn referenced this issue from a commit in joidegn/geturl
@dideler dideler Fixes #3 - support files with whitespace and special chars f258d92
@joidegn joidegn referenced this issue from a commit in joidegn/geturl
@dideler dideler Fixes #3 - support files with whitespace and special chars 885c6af
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.