Permalink
Browse files

blah blah

  • Loading branch information...
1 parent 134a9d0 commit 873a03c00fb872b318fc2da5fe7e9e84f3c2c8a7 @antimatter15 antimatter15 committed Mar 15, 2011
Showing with 10 additions and 2 deletions.
  1. +9 −1 hosts/google/docs.js
  2. +1 −1 manifest.json
View
@@ -18,7 +18,7 @@ Hosts.gdocs = function uploadGDocs(req, callback){
callback();
}catch(err){
if(resp.indexOf("ServiceForbiddenException") != -1){
- callback('error: Google Docs API only supports Document, Presentation and Spreadsheet files.');
+ callback('error: Google Docs API only supports ppt, docx, doc, xlsx, xls, jpeg, html, png, rtf, csv, odf, odt, ods, and odt.');
}else{
callback('error:'+resp.replace(/<.*?>/g,' ').replace(/ +/g,' '));
}
@@ -34,6 +34,14 @@ Hosts.gdocs = function uploadGDocs(req, callback){
if(file.name.indexOf('.xls') != -1) file.type = 'application/vnd.ms-excel';
if(file.name.indexOf('.ppt') != -1) file.type = 'application/vnd.ms-powerpoint';
+
+ if(file.name.indexOf('.xlsx') != -1) file.type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';
+ if(file.name.indexOf('.docx') != -1) file.type = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';
+
+ file.type = file.type.replace(/;.+/g,'');
+
+ console.log('uploading new mime type', file.type);
+
GoogleOAUTH.sendSignedRequest(
'https://docs.google.com/feeds/default/private/full',
complete,
View
@@ -1,6 +1,6 @@
{
"name": "Cloud Save",
- "version": "1.2.1",
+ "version": "1.2.2",
"description": "Save to cloud.",
"background_page": "cloudsave.html",
"permissions": [

0 comments on commit 873a03c

Please sign in to comment.