{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/pyocclient/issues/91","labels_url":"https://api.github.com/repos/owncloud/pyocclient/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/pyocclient/issues/91/comments","events_url":"https://api.github.com/repos/owncloud/pyocclient/issues/91/events","html_url":"https://github.com/owncloud/pyocclient/issues/91","id":75737678,"number":91,"title":"pdf upload and link doesn't work","user":{"login":"mss2015","id":12418245,"avatar_url":"https://avatars.githubusercontent.com/u/12418245?v=3","gravatar_id":"","url":"https://api.github.com/users/mss2015","html_url":"https://github.com/mss2015","followers_url":"https://api.github.com/users/mss2015/followers","following_url":"https://api.github.com/users/mss2015/following{/other_user}","gists_url":"https://api.github.com/users/mss2015/gists{/gist_id}","starred_url":"https://api.github.com/users/mss2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mss2015/subscriptions","organizations_url":"https://api.github.com/users/mss2015/orgs","repos_url":"https://api.github.com/users/mss2015/repos","events_url":"https://api.github.com/users/mss2015/events{/privacy}","received_events_url":"https://api.github.com/users/mss2015/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-12T21:03:48Z","updated_at":"2015-05-13T12:56:11Z","closed_at":null,"body":"I've successfully used the example script found at https://github.com/owncloud/pyocclient 'Usage' to upload and link to a text file, however I'm having trouble getting a pdf file to work successfully. I am able to access my OwnCloud server, and the link is successfully generated, but the resulting pdf file is corrupted - both manual download and linked download.\r\n\r\nHere is the code I am using to upload the pdf. Is there something I am missing? \r\nThanks, \r\nmss\r\n\r\nimport owncloud\r\n\r\noc = owncloud.Client('http://localhost/owncloud')\r\noc.login('user1', 'test')\r\n\r\nbatch_num = '4'\r\nsdd = '1309'\r\ntype = '.pdf'\r\nfolder = 'hyperlink_test'\r\nroot = \"F:\\\\path\\\\batch\"+batch_num+\"\\\\PDF\\\\\"+sdd+type\r\n\r\noc.mkdir(folder)\r\noc.put_file(folder+'/'+sdd+type, root)\r\nlink_info = oc.share_file_with_link(folder+'/'+sdd+type)\r\nprint \"LINK: \" + link_info.link"},"comment":{"url":"https://api.github.com/repos/owncloud/pyocclient/issues/comments/101654083","html_url":"https://github.com/owncloud/pyocclient/issues/91#issuecomment-101654083","issue_url":"https://api.github.com/repos/owncloud/pyocclient/issues/91","id":101654083,"user":{"login":"PVince81","id":277525,"avatar_url":"https://avatars.githubusercontent.com/u/277525?v=3","gravatar_id":"","url":"https://api.github.com/users/PVince81","html_url":"https://github.com/PVince81","followers_url":"https://api.github.com/users/PVince81/followers","following_url":"https://api.github.com/users/PVince81/following{/other_user}","gists_url":"https://api.github.com/users/PVince81/gists{/gist_id}","starred_url":"https://api.github.com/users/PVince81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PVince81/subscriptions","organizations_url":"https://api.github.com/users/PVince81/orgs","repos_url":"https://api.github.com/users/PVince81/repos","events_url":"https://api.github.com/users/PVince81/events{/privacy}","received_events_url":"https://api.github.com/users/PVince81/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T12:56:11Z","updated_at":"2015-05-13T12:56:11Z","body":"Somehow yes, using a URL like git+https://github.com/owncloud/pyocclient.git@master#egg=pyocclient"}}