Author: api.jfisher
Date: Mon Dec 10 18:13:18 2007
New Revision: 355
Modified:
trunk/clients/cs/src/gdocuments/documentservice.cs
Log:
Small change to use the filename on upload when one is not provided.
Modified: trunk/clients/cs/src/gdocuments/documentservice.cs
==============================================================================
--- trunk/clients/cs/src/gdocuments/documentservice.cs (original)
+++ trunk/clients/cs/src/gdocuments/documentservice.cs Mon Dec 10
18:13:18 2007
@@ -103,9 +103,15 @@
/// <returns>A DocumentEntry describing the created document.</returns>
public DocumentEntry UploadDocument(string fileName, string
documentName)
{
+
FileInfo fileInfo = new FileInfo(fileName);
FileStream stream = fileInfo.OpenRead();
Uri postUri = new Uri(DocumentsListQuery.documentsBaseUri);
+
+ if (documentName == null)
+ {
+ documentName = fileInfo.Name;
+ }
//convert the extension to caps and strip the "." off the front
string ext = fileInfo.Extension.ToUpper().Substring(1);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Data API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---