PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Possible error cases:
  • Types of files supported by Google
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
GglUploadDocument (Function)
In French: GglEnvoieDocument
Sends a document to the Google server.
Warning
From version 20 (51), the management of Google documents evolves.
Indeed, the management of Google documents in WLanguage was using the "Google Documents List" service. The "Google Documents List" service will no longer be accessible from April 2015.

From now on, only the "Drive" API can be used. Using this API in your applications requires:
  • the declaration of the application in the Google console,
  • the activation of "Drive" API in the Google console.
See the help about gglConnect ("Prerequisite for the OAuth 2.0 authentication" paragraph) for more details.
The WLanguage functions and types used to manage the Google documents evolve in order to manage the "Drive" API from version 200051.
Note: If you are using an earlier version of WINDEV, WEBDEV or WINDEV Mobile, the functions for managing the Google documents can no longer be used from April 2015.
Example
// Connection
IF GglConnect(Cnt) = False THEN
Error(ErrorInfo())
ELSE
// Send a Word file
GglUploadDocument(Cnt, "C:\Docs\file.doc")
END
Syntax
<Result> = GglUploadDocument(<Google Connection> , <Document Path> [, <Source Language> [, <Destination Language>]])
<Result>: Boolean
  • True if the file was successfully sent,
  • False if a problem occurred. To find out the error details, use ErrorInfo.
<Google Connection>: gglConnection variable
Name of gglConnection variable to use. This connection was validated by GglConnect.
Versions 20 and later
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
New in version 20
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
Caution: the properties of the gglConnection variable must be revised for the OAuth 2.0 authentication.
<Document Path>: Character string (with quotes)
Name and full (or relative) path of file (up to 260 characters). A UNC path can be used.
<Source Language>: Character string (with quotes)
Versions 17 and later
Current language of the document. This parameter is used to define the source language for translating the document. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php
If this parameter corresponds to an empty string (""), Google tries to automatically detect the language of the document.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 17
Current language of the document. This parameter is used to define the source language for translating the document. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php
If this parameter corresponds to an empty string (""), Google tries to automatically detect the language of the document.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Current language of the document. This parameter is used to define the source language for translating the document. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php
If this parameter corresponds to an empty string (""), Google tries to automatically detect the language of the document.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
<Destination Language>: Character string (with quotes)
Versions 17 and later
Language of the document found on the server. This parameter is used to translate the document when sending the file. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 17
Language of the document found on the server. This parameter is used to translate the document when sending the file. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Language of the document found on the server. This parameter is used to translate the document when sending the file. This parameter corresponds to the country code in ISO639-1 standard. The list of country codes in ISO639-1 format can be found at the following address: http://www.loc.gov/standards/iso639-2/php/code_list.php.
Versions 20 and later
Caution: When using the "Drive" API, this parameter is no longer taken into account.
New in version 20
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Caution: When using the "Drive" API, this parameter is no longer taken into account.
Remarks

Possible error cases:

  • The Internet connection is not valid.
  • The authentication was not performed properly.
  • The path of the document does not exist, the format of the document is not supported or the document is too big.

Types of files supported by Google

  • PowerPoint presentation files (ppt and pps extensions). Size limit: 10 MB.
  • HTML files, text files, Word files (doc extension), OpenDocument Text files (odt extension), RTF files, Star Office files (sxw extension): 500 KB.
  • Files corresponding to worksheets (csv, xls and ods extensions): 1 MB.

Special cases

  • The characteristics of a document found on the Google server are managed via the gglDocument variables. To find out the characteristics of all the documents found on a Google server, use GglListDocument: this function fills an array of gglDocument variables.
  • The Web interface is used to:
    • include a document in a folder.
    • give a title to the document.
    • mark the documents as "starred".
These elements are not managed by programming in this version.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230ggl.dll
Windows Mobile wp230ggl.dll
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment