lib/ayadn/fileops.rb in ayadn-1.5.1 vs lib/ayadn/fileops.rb in ayadn-1.6.0
- old
+ new
@@ -47,10 +47,10 @@
when ".png"
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content=@#{file};type=image/png" -F 'public=true' -X POST`
when ".gif"
`curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content=@#{file};type=image/gif" -F 'public=true' -X POST`
else #jpg or jpeg or JPG or JPEG, automatically recognized as such
- `curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F content=@#{file} -F 'public=true' -X POST`
+ `curl -k -H 'Authorization: BEARER #{token}' https://api.app.net/files -F 'type=com.ayadn.files' -F "content=@#{file}" -F 'public=true' -X POST`
end
rescue Errno::ENOENT
abort(Status.no_curl)
end
end