function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Upload a document to Google docs using APEX/Sites...

Hi, trying to load documents (some could be 5MB+) to Google Docs instead of SFDC, but using Sites so I can link the doc back to a record.


I'm trying to follow the toolkit code sampes:


But, even the simple example:


string doctitle = 'upload sample.csv';
string csvBody = 'name,city,state' + '\n' + 'bill,new york,new york';
GoogleData sheet = service.uploadDocument(


 Doesn't work for me....I've authenticated (I think), but get a:


System.NullPointerException: Attempt to de-reference a null object


I know I'll have more actually uploading the doc using sites in order to parse it, but I'm not even there yet.  anyone done this?