Easily upload your documents to Google Docs!

Thursday, January 24, 2008 at 8:30 AM



To demonstrate the functionality of the Documents List Data API, I have released a new sample application that makes uploading your documents even easier. The application works on Windows PCs running the .NET Framework 2.0 or higher.

Download the Documents List Uploader.

Files can be uploaded to Google Docs either by enabling a right-click menu item or through drag-and-drop functionality. This makes it simple to browse through your local files and selectively upload the ones you want to edit, share, or publish using Google Docs.

I have also written a new article -- .NET Documents List Uploader Sample -- detailing the construction of the sample. The article explains the code and allows you to extend the sample with your own functionality. The sample application is released under the Apache 2.0 license, and is free for anyone to use and modify under the terms of that license.

54 comments:

Dr. LM said...

I Could not install the "Documents List Uploader".
I Always receive this error:
AppName: doclistuploader-1.0[1].exe AppVer: 1.0.0.0 AppStamp:47863159
ModName: kernel32.dll ModVer: 5.1.2600.2945 ModStamp:44ab9ac3
fDebug: 0 Offset: 00012a5b

A. said...

It worked for me, but why won't it upload pdf files?

adojaan said...

Download would also be great!

api.rboyd said...

dr. lm - If you're having problems with installing, you might want to make a post over on the Docs APIs group: http://groups.google.com/group/Google-Docs-Data-APIs

a. - Google Docs doesn't currently allow uploading PDFs - If that's added to the product, we'll certainly consider it for the API and this sample app.

adojaan - Thanks for the suggestion!

Mykola Novik said...

I'd like to use DocList uploader at work, where we have password-secured proxy. Could you please add proxy support to this tool?

alfred said...

any chance of implementing this functionality in bash?

Valery Hronusov aka Valery35 said...

Vista by click on "Add DocList..." returned
************** Текст исключения **************
System.UnauthorizedAccessException: Отказано в доступе к разделу реестра "HKEY_CLASSES_ROOT\*\shell\Send to Google Docs\command".
в Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
в Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
в Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
в DocListUploader.HiddenForm.Register()
в DocListUploader.OptionsForm.contextCheckBox_CheckedChanged(Object sender, EventArgs e)
в System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
в System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
в System.Windows.Forms.CheckBox.OnClick(EventArgs e)
в System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
в System.Windows.Forms.Control.WndProc(Message& m)
в System.Windows.Forms.ButtonBase.WndProc(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Jeff Fisher said...

Valery-

This is due to the fact adding a context menu in Vista is a restricted operation if you are using User Account Control.

It is possible to recompile the sample with a manifest file that requests administrator permissions, but then non-administrators aren't able to run the program. I haven't found a way to implement a context menu in Vista for a non-administrative account.

If anyone has any pointers, I'd be happy to update the sample.

As to adding proxy support, I'd like to leave it as an exercise for the reader. Some pointers about how to accomplish it using the .NET client library can be found here:

http://code.google.com/p/google-gdata/wiki/WebProxySetup

Jeff Fisher said...

Hooray! I come bearing updates:

First off, I have received the sacred knowledge required to fix the Vista bug with right-click menus.

Download the new version of the sample here: http://google-gdata.googlecode.com/files/DocListUploader-1.1.exe

If you're interested in what changed, you can see the diff:

http://code.google.com/p/google-gdata/source/diff?r=474&format=side&path=/trunk/clients/cs/samples/DocListUploader/HiddenForm.cs


One last thing - I forgot something useful about using Proxies with .NET: If you set up your proxy inside of Internet Explorer's configuration, the settings should be used by default in .NET applications. So, to anyone wondering how to use a proxy, make sure it's configured in IE! .NET is kind of magical at times. :)

Mykola Novik said...
This post has been removed by the author.
Mykola Novik said...

I run DocList Uploader, entered my e-mail and password, clicked Login and get this message:
"Error logging into Google Docs: Execution of authentication request returned unexpected large content length:1306"
I'm behind secured proxy, it's address is set in IE's settings (actually I have IE running right now).
Looks like feature with .NET proxy magic doesn't work as expected. :-(

jacob said...

I've created a little droplet application for Mac OS X 10.5 for uploading docs.

ssx said...

I was testing the upload for .csv and .txt file. sometimes I would use a report writer to output some fixed length columnar layout data from the company's mainframe. I can add "," on each record to make the report appeared as a .csv layout but that adds a lot of work to editing the report script. I wonder if you could add an attribute in upload to indicate the upload file type such as that available in old dBase "TYPE" to tell google.spreadsheet to load a .csv or fixed length ASCII file. The parse line as in Excel/1-2-3 is optional.
By the way, I have tried once to put my old address book into a .csv file and import into Outlook. Can you provide similar facility in google.calendar and gmail? Thanks
ssx106

Rob Gaudet said...

I created an article that describes how to use the Google API with any blog tool. I use BlogEngine.net so the specifics for it are emphasized. See it here.

http://www.pencilsintheceiling.com/post/How-To-Publish-A-Blog-From-Google-Docs.aspx

dcha said...

I just downloaded and install DocListUploader and encountered the following error:

Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 3/11/2008
Time: 1:06:27 PM
User: N/A
Computer: GW
Description:
EventType clr20r3, P1 doclistuploader-1.1.exe, P2 1.0.0.0, P3 47bee94c, P4 system.runtime.remoting, P5 2.0.0.0, P6 461ef14b, P7 28c, P8 3a, P9 system.runtime.remoting.remoting, P10 NIL.

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 63 00 6c 00 72 00 32 00 c.l.r.2.
0008: 30 00 72 00 33 00 2c 00 0.r.3.,.
0010: 20 00 64 00 6f 00 63 00 .d.o.c.
0018: 6c 00 69 00 73 00 74 00 l.i.s.t.
0020: 75 00 70 00 6c 00 6f 00 u.p.l.o.
0028: 61 00 64 00 65 00 72 00 a.d.e.r.
0030: 2d 00 31 00 2e 00 31 00 -.1...1.
0038: 2e 00 65 00 78 00 65 00 ..e.x.e.
0040: 2c 00 20 00 31 00 2e 00 ,. .1...
0048: 30 00 2e 00 30 00 2e 00 0...0...
0050: 30 00 2c 00 20 00 34 00 0.,. .4.
0058: 37 00 62 00 65 00 65 00 7.b.e.e.
0060: 39 00 34 00 63 00 2c 00 9.4.c.,.
0068: 20 00 73 00 79 00 73 00 .s.y.s.
0070: 74 00 65 00 6d 00 2e 00 t.e.m...
0078: 72 00 75 00 6e 00 74 00 r.u.n.t.
0080: 69 00 6d 00 65 00 2e 00 i.m.e...
0088: 72 00 65 00 6d 00 6f 00 r.e.m.o.
0090: 74 00 69 00 6e 00 67 00 t.i.n.g.
0098: 2c 00 20 00 32 00 2e 00 ,. .2...
00a0: 30 00 2e 00 30 00 2e 00 0...0...
00a8: 30 00 2c 00 20 00 34 00 0.,. .4.
00b0: 36 00 31 00 65 00 66 00 6.1.e.f.
00b8: 31 00 34 00 62 00 2c 00 1.4.b.,.
00c0: 20 00 32 00 38 00 63 00 .2.8.c.
00c8: 2c 00 20 00 33 00 61 00 ,. .3.a.
00d0: 2c 00 20 00 73 00 79 00 ,. .s.y.
00d8: 73 00 74 00 65 00 6d 00 s.t.e.m.
00e0: 2e 00 72 00 75 00 6e 00 ..r.u.n.
00e8: 74 00 69 00 6d 00 65 00 t.i.m.e.
00f0: 2e 00 72 00 65 00 6d 00 ..r.e.m.
00f8: 6f 00 74 00 69 00 6e 00 o.t.i.n.
0100: 67 00 2e 00 72 00 65 00 g...r.e.
0108: 6d 00 6f 00 74 00 69 00 m.o.t.i.
0110: 6e 00 67 00 20 00 4e 00 n.g. .N.
0118: 49 00 4c 00 0d 00 0a 00 I.L.....

Is there any solution to this problem?

ssx said...

I believe you need to download and install .NET runtime library to run docloader. That's why I yet to try it out.

ssx said...

Rob, I got the faintest idea after reading the blog so I wend back to API documentations. It is more than I can swallow given my less than adquate understanding of XML. I guess by going through the Client library I would be able to find my own answer. I may take longer but I'm sure it will be fun for the next many weeks.By the way, I have downloaded cURL for more than a year now. I might us this project to teach myself cURL. So much fun for a retiree! whew!

Rob Gaudet said...

ssx, what blog platform are you using? I will be glad to help you along.

ssx said...

Rob, I'm not bloging. I'm just trying to repeat my last few years' work in Excel by repeating it in Google Spreadsheet. I just hooked up with my previous boss offering to do some management reporting (non-financial) for him. It will be getting some source data (ASCII in CSV or fixed length format) from a unisys mainframe in Beijing, do some textual report plus a few charts on a Google sheet and share it with all concerned. So I don't think the upload doc gadget useful for my purpose. Cheers. SSX

ssx said...

I had read through some of the API documents and it seemed it is not too difficult for an ordinary person to do the task. It seems we are suppose to use the http protocol to push our document into google's docs server or get a docs into our pc. With the proper constructs in the http you could insert a new spreadsheet or request spreadsheet data for manipulation. My new question is that how can I test the API examples? Am I suppose to type the long http entry inside a Windows xp console and it will be sent to the server just like i can 'ping' an IP address by simply type 'ping' at the command prompt?

Michael Kariv said...

Jeff, a great tool. Works as advertized. I love it. In my current experience Spreadsheets can be worked with direct no problem, Documents some can and some I prefer to work at with Word and upload, Presentations I always use PowerPOint first. Presentations are not yet ready IMHO. So the uploader is very important to me. I try to have all our work on Google apps, in the end. Keep up the good work.

Michael

Ed said...

Nice app. One thing on the wishlist for me though, would be to be able to drag and drop folders.

Marcus said...

Hi, I am trying to install the DocListUploader on a Windows XP Service Pack 2 PC. The installation fails with the standard Microsoft crash screen with the text "DocListUploader has encountered a problem and needs to close. We are sorry for the inconvenience.", and offers to send a report to Microsoft.

I am an administrator of the PC and I have .NET 2.0 installed.

the error signature reads "AppName: doclistuploader-1.1.exe AppVer: 1.0.0.0 AppStamp:47bee94c
ModName: kernel32.dll ModVer: 5.1.2600.3119 ModStamp:46239bd5
fDebug: 0 Offset: 00012a5b"

Then there is a full data dump that is too large to post here, but I could email it to anyone who is interested.

I receive the same error installing version 1.0 or 1.1 of the DocListUploader.

Does anyone have any hints as to what could be wrong? any experiments that I could try?

Thanks

Andwan said...

Your Google Uploadeder 1.1 works perfectly.

Am wondering, does GoogleDoc API have a set DateModified? I was wondering how easy would it be to set the DateModified in GoogleDocs to correspond to the local files on your PC.

Jérôme said...
This post has been removed by the author.
Nick C said...

I'm having the same problems: "docs.googl.com/feeds/documentes/private/full?max-results=1"

Nick C said...

Oddly it's a permission issue only trying to use the DocumentsListQuery. Trying the DocumentEntry function works fine.

api.rboyd said...

@nick c and @jerome

Can you please post a thread over here?:
http://groups.google.com/group/Google-Docs-Data-APIs/

We tested the app after you reported the problem and it was working correctly for us. That URL does seem incorrect though-- hostname should be documents.google.com (instead of docs.googl.com) and the word 'documents' in the path is spelled as 'documentes'.

Cheers,
-Ryan

Nick C said...

I was copying and pasting from jerome's posting error, and that was probably a typo mistake.

Testing the app works through authentication now (it didn't before), but now gets a similar error message during the GetDocs method specifically when calling:

DocumentsFeed feed = service.Query(query);

Here's the error message:
"Error retrieving documents: Execution of request failed:http://docs.google.com/feeds/documents/private/full"

I will post to the other forum as well.

Manuela said...

I have the same error "Error retrieving documents: Execution of request failed:http://docs.google.com/feeds/documents/private/full" when my gmail account contains at least one document that is a pdf file. Is it a way to solve this error? Thank you.

Nick C said...

Thanks Manuela. That did the trick, the API is not friendly with PDF documents. It's a shame you also can't upload a PDF through the API, but you can do it through the Web interface.

I'm building a scanning application that will scan directly to Google Docs. It will be nice when the PDF is supported.

Thanks,

api.rboyd said...

Thanks Manuela and Nick for your report and investigation.

I have confirmed the problem and filed an issue at:
http://code.google.com/p/gdata-issues/issues/detail?id=589

I've also escalated this to the appropriate people for resolution.

@nick c- it'll be great to see what you end up building. I have a wonderfully fast sheet-fed scanner, but the software (and all other document management software) is very utilitarian and leaves much to be desired! Search is also essential, but the search appliance isn't in my budget right now :)

Cheers,
-Ryan

api.rboyd said...

@Manuela and @Nick C

This issues has been resolved, and I've closed out the bug. Sorry for the issues, but the doclist API should function correctly now with PDFs in the list.

Cheers,
-Ryan

Manuela said...

Thank you Ryan, it was the first thing I verified in the morning.

Manuela said...

I want to adress another issue concerning pdf files.

Yes, when I made a request for retrieving the list of documents, the request works
fine, without any error.

But, when I want to UPLOAD a PDF file using .NET Google Data Client Library (in
DocumentService I called UploadDocument) I have another error:

- Execution of request failed: http://docs.google.com/feeds/documents/private/full
- The remote server returned an error: (415) Unsupported Media Type.

I manually added in the constructor of DocumentsService
class the code: GDocumentsAllowedTypes.Add("PDF", "application/pdf");

Can anyone help me?

solarisdreams said...

Need to upload PDFs but doesn't work. Uping via rightclick makes it crash. Drag and drop onto the app makes gives an error. I'm on Vista...

HELP!

api.rboyd said...

@solarisdreams

The Documents List API does not yet support uploading PDFs. If you need to upload PDFs, you'll need to use the website (docs.google.com) instead of this sample application.

BD said...

Uploader converted Hebrew file names to gibberish; google docs leaves the file names as is with regular upload

Lesly said...

Hi, Great blog. Talking about windows, there is something I have to say. Recently I decided to change windows in my house. Looked through numerous companies and could not decide which to choose. I went to this great site www.pissedconsumer.com to read customers reviews. And I should say it was very helpful. I made the right choice and I am completely satisfied with it.

Dawn Boe said...

As of Sept 2008 Google Apps now allows the upload of pdf files. Can someone update the Google List Uploader to now include the upload of pdf files?

Tony said...

any way to schedule this upload in the background?

thevgb said...

Will the uploader be allowing the upload of PDFs????

api.jhartmann said...

@thevgb: The API currently doesn't support PDF upload, but this is something that is being worked on. Once that's done, it would probably be a trivial change to make the Uploader also be able to upload PDFs.

I would recommend starring the feature request linked below to be notified when PDFs are supported:

http://code.google.com/p/gdata-issues/issues/detail?id=591

Cheers,
- Jochen

voscausa said...

In vista I receive: DocList Uploader stopped working, when I use the right click menu.

I already switched off UAC

I have no problems when I use drag-and-drop.

Pushpa Studio said...

i also hve same problem thet i want to upload a sitemap xml and html file can u help me?


nitin
9892516802

Pushpa Studio said...

i also hve same problem thet i want to upload a sitemap xml and html file can u help me?


nitin
9892516802

Pushpa Studio said...

i also hve same problem thet i want to upload a sitemap xml and html file in google blog can u help me?


nitin
9892516802

Pushpa Studio said...

i also hve same problem thet i want to upload a sitemap xml and html file in google blog can u help me?


nitin
9892516802

Znuff said...

Hello.

I've tried recompiling this against a new API (1.3.1.0) and it seems uploading PDF is still not supported trough the API.

I'm still getting the "Unable to upload the file:..... Execution of request failed: http://docs.googe.com/feeds/documents/private/full"

Such a shame :-(

uiyui said...

This momentousdecree wow gold came as a great beacon gold in wow light of hope buy wow gold to millions of negroslaves wow gold kaufen who had been seared in the flames of withering injustice.maplestory mesos it came as a joyous daybreak to end the long night ofcaptivity.but one hundred years later,maplestory money we must face the tragic fact thatthe negro is still not free.maple money one hundred years later,sell wow gold the lifeof the negro is still sadly crippled by the manacles ofsegregation and the chains of discrimination. one hundred yearslater,maple story money the negro lives on a lonely island of poverty in themidst of a vast ocean of material prosperity.wow powerleveling one hundred yearslater,maple story power leveling the negro is still languishing in the corners of americansociety and finds himself an exile in his own land. so we havecome here today to dramatize wow powerleveln an appalling condition.in a ms mesos sense we have come to our nation''s capital to cash a check.when the architects of our republic wow powerleveln wrote the magnificent wordsof the constitution and the declaration of independence, theywere signing a promissory note maplestory power leveling to which every american was tofall heir.

David said...

Hi. I'm sorry to barge in on your conversation uninvited. But I was looking for a way to batch-upload a boat load of PDF's, with our folder structure in tact, into Google Docs. I have been able to upload them one at a time, but we have 67,000 to upload, ranging in size, and in folder structures on a microsoft windows platform (not Vista). After reading everybody's comments, perhaps I'm wishful thinking to believe (or hope) I can do this with Google Docs. I tend to think I'm not the only person out there who needs this ability to bulk-upload with folder structures in tact. If I can't currently do it, will I be able to do it, and when might that be? Thanks. David.

Znuff said...

Unfortunatelly, David, you can't upload PDF's with the batch uploader at all, no word about the directory structre.

David said...

Ok, thanks. Have a great afternoon and thanks again for replying.

karan said...

Hi,

Thanks for this code... i am new to google docs api and was looking for something like this...

can the same thing be using java script... if yes where can i find the code... or atleast APIs in java script