You need to sign in to do that
Don't have an account?

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:
http://wiki.developerforce.com/index.php/Google_Documents_API
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(
csvBody,
doctitle,
'text/csv');
sheet.dump();
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 questions...like actually uploading the doc using sites in order to parse it, but I'm not even there yet. anyone done this?