无法上传大文件到谷歌文档 [英] Unable to upload large files to Google Docs

查看:167
本文介绍了无法上传大文件到谷歌文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在谷歌文档上传的文件为:

I am uploading documents on Google Docs as:

DocumentsService myService = new DocumentsService("");
myService.setUserCredentials("username@domain.com", password );
DocumentEntry newEntry = myService.UploadDocument(@"C:\Sample.txt", "Sample.txt");



但是,当我尝试上载的3 MB的文件我得到一个异常:

But when I try to upload a file of 3 MB I get an exception:


未处理的异常'Google.GData.Client.GDataRequestException'
发生在Google.GData.Client.dll
附加信息:
请求的执行失败:
的http:/ /docs.google.com/feeds/documents/private/full

如何上传大文件到谷歌文档?我使用谷歌API版本2

How can I upload large files to Google Docs? I am using Google API ver 2.

推荐答案

在你的代码尝试上传.txt文件。

In your code you are attempting to upload a .txt file.

这可转换将被转换为谷歌文档文档文件。

This will be converted to a Google Docs "Document" file.

文件被限制以(2MB大小)的1万字。

Files that can be converted are limited to 1 Million characters of (2Mb in size).

如果你改变了外延式的东西,是不是由谷歌文档识别(例如.LOG),它会允许你上传的高达10Gb的文件!虽然免费帐户只存储1GB的文件。

If you change the extension type to something that is not recognised by Google Docs (for example .log), it will allow you to upload a file of up to 10Gb! Although the free account only has 1Gb of storage for files.

这将允许您通过您的应用程序存储和检索文件,但用户将不能够直接修改它们与谷歌文档的界面,但他们仍然可以下载它。

This will allow you to store and retrieve files via your application, but the user will not be able to directly modify them with the Google docs interface, although they can still download it.

这篇关于无法上传大文件到谷歌文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆