{"action":"created","issue":{"url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/28","repository_url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR","labels_url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/28/comments","events_url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/28/events","html_url":"https://github.com/MarkEdmondson1234/googleAuthR/issues/28","id":144702167,"number":28,"title":"Support non-JSON uploads","user":{"login":"jess28","id":6451542,"avatar_url":"https://avatars.githubusercontent.com/u/6451542?v=3","gravatar_id":"","url":"https://api.github.com/users/jess28","html_url":"https://github.com/jess28","followers_url":"https://api.github.com/users/jess28/followers","following_url":"https://api.github.com/users/jess28/following{/other_user}","gists_url":"https://api.github.com/users/jess28/gists{/gist_id}","starred_url":"https://api.github.com/users/jess28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jess28/subscriptions","organizations_url":"https://api.github.com/users/jess28/orgs","repos_url":"https://api.github.com/users/jess28/repos","events_url":"https://api.github.com/users/jess28/events{/privacy}","received_events_url":"https://api.github.com/users/jess28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2016-03-30T19:52:58Z","updated_at":"2016-04-05T12:27:54Z","closed_at":null,"body":"I've been trying to use googleAuthR for a shiny app that uploads user files to a universal Google Storage account. I'm having trouble figuring out how to set up the body of the request so that the actual file data gets sent to the API rather than just the json metadata. All that happens right now is that my file in Google Storage is just a json file with the name and type of the file I want to upload.\r\n\r\nI tried using httr's upload_file() to create the upload data and then pass that to the body, but I'm not very versed in httr or curl, so I'm not sure how else to do this. I think my issue is that the body of the request gets parsed into json, when I don't want to parse the actual file data. \r\n\r\nI'm just trying to use a simple upload at this point (https://cloud.google.com/storage/docs/json_api/v1/how-tos/upload) and I just can't figure it out!\r\n\r\nIs there a specific way to create a file data stream or something for use with googleAuthR? I really appreciate the easy authorization with shiny this package provides and I'd rather not have to deal with straight httr! \r\n\r\nThanks,\r\n\r\nJess"},"comment":{"url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/comments/205778948","html_url":"https://github.com/MarkEdmondson1234/googleAuthR/issues/28#issuecomment-205778948","issue_url":"https://api.github.com/repos/MarkEdmondson1234/googleAuthR/issues/28","id":205778948,"user":{"login":"MarkEdmondson1234","id":3155884,"avatar_url":"https://avatars.githubusercontent.com/u/3155884?v=3","gravatar_id":"","url":"https://api.github.com/users/MarkEdmondson1234","html_url":"https://github.com/MarkEdmondson1234","followers_url":"https://api.github.com/users/MarkEdmondson1234/followers","following_url":"https://api.github.com/users/MarkEdmondson1234/following{/other_user}","gists_url":"https://api.github.com/users/MarkEdmondson1234/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkEdmondson1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkEdmondson1234/subscriptions","organizations_url":"https://api.github.com/users/MarkEdmondson1234/orgs","repos_url":"https://api.github.com/users/MarkEdmondson1234/repos","events_url":"https://api.github.com/users/MarkEdmondson1234/events{/privacy}","received_events_url":"https://api.github.com/users/MarkEdmondson1234/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T12:27:54Z","updated_at":"2016-04-05T12:27:54Z","body":"Use the github version of googleAuthR v 0.2.0.9000 - I tracked it down the error - it is just some feedback messages that are trying to read JSON when there is not in the CRAN version.\r\n\r\nThis line corrects it, by only showing the message if its json encoding:\r\n```\r\nif(!is.null(the_body) && arg_list$encode == \"json\"){\r\n+    myMessage(\"Body JSON parsed to: \", jsonlite::toJSON(the_body, auto_unbox=T), level = 2)\r\n```\r\n\r\nI'll patch it and try to get on CRAN asap. Thanks for helping find it!\r\n\r\n"}}