cyrillef / forge.commandline-curl

Authorization and file translation demo: Demonstrates Autodesk Forge API authorization and translation process using cURL
MIT License
12 stars 8 forks source link

no support for models with spaces in the path name #2

Closed jeremytammik closed 9 years ago

jeremytammik commented 9 years ago

i tried the following command:

$ ./viewerAPI upload "/a/rvt/Urban House - 2015.rvt" 

that returns the following:

curl: option -: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
No JSON object could be decoded
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
ID: 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Location: 
/Users/jta/a/src/web/viewer/git/workflow-curl-view.and.data.api/scripts/upload: line 59: $ROOT/data/${bucket}.${filename}.json: ambiguous redirect
cyrillef commented 9 years ago

spaces were working for me, the - was the problem however 'line 59: $ROOT/data/${bucket}.${filename}.json: ambiguous redirect' was due to spaces both issues fixed and tested. However, oss returns only the first piece for the reference name (it cuts everything out after the first space). I need to investigate this part.

jeremytammik commented 9 years ago

thank you!

jeremytammik commented 9 years ago

shall we create a new release now? e.g., 1.0.0.1 or something? i see that npm uses a release numbering system, using 3 numbers, not 4? shall we switch from 1.0.0.0 to 2.0.0? or 1.0.1?