Rather than accessing the fiile through an 'http' protocol,File expects a
path on the machine's local file system.

http://code.google.com/apis/documents/docs/2.0/developers_guide_java.html#UploadingDocContents

Eric

On Sun, Jun 28, 2009 at 11:48 PM, gonzalosanchezoj...@gmail.com <
gonzalosanchezoj...@gmail.com> wrote:

>
> hi.
>     i want to upload a spreadsheet .ods file (not empty) from a url
> to google. my code is as follow:
>        File documentFile = new File(Path);
>        //File documentFile = new File("file://localhost:8180/
> keygoosMachine/default_spreadsheet.ods");
>        String mimeType = DocumentListEntry.MediaType.fromFileName
> (documentFile.getName()).getMimeType();
>        newDocument.setFile(documentFile, mimeType);
>
> my problem is that path is of the form http://....
> but when i try this trows an not found Exception on: http:\.....
> is there another function like setFile that use URL???
>
> thanks in advance
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to