#g4gdrv_upload

      *//////////////////////////////////////////////////////////////*
      * #g4gdrv_upload - Upload File                                 *
      *                                                              *
      * Output:                                                      *
      *   out_errMsg - The error message (if error exists).          *
      *                                                              *
      * Returns:                                                     *
      *   -1 for error, 1 for success                                *
      *                                                              *
      * Settable Variables ([r]=required)                            *
      *   id - Google ID [r]                                         *
      *   upload_file - The fully qualified path of the file in the  *
      *    IFS to upload. [r]                                        *
      *   upload_file_name - The name of the file as it will exist   *
      *    in the Google Drive.  Blank or *DFT will use the name     *
      *    of the file in the upload_file parameter                  *
      *   upload_file_content_type - Specify the content type of     *
      *    the file to upload.  Blank or *DFT will use the content   *
      *    type of the file name used.                               *
      *   upload_to_folder - Specify the fully qualified path of     *
      *    the folder on the Google Drive to upload the file to      *
      *    (case sensitive).  The value of Blank or *ROOT will       *
      *    upload the file to the root folder.                       *
      *   replace_file - Specify *YES to replace the file if it      *
      *    exists or *NO to add another file with the same name.     *
      *    The default is *YES.                                      *
      *   ccsid - The CCSID to use (1252)                            *
      *   debug - Turn on Debug (*NO, *YES)                          *
      *   debug_file - The debug file name.                          *
      *                 (/tmp/g4g_[id]_listGroupsDebug.txt)          *
      *                                                              *
      *//////////////////////////////////////////////////////////////*
     D #g4gdrv_upload...
     D                 PR            10i 0
     D  out_errMsg                  256    Options(*NOPASS)

#g4gdrv_upload will upload a file from your IFS to your Google Drive

Returns:
1 for successful upload, -1 for error.

Optional Parameters:
  • Error Message (output) - Error message  
Settable Variables (use #g4gdrv_setValue):
  • id (required) - Your Google ID
  • upload_file - The fully qualified path to the file you wish to upload.
  • upload_file_name - The name of the file as it will appear in your Google Drive
  • upload_file_content_type - The Content Type of the file you are uploading.
  • upload_to_folder - The Google Drive Folder you wish to upload the file to.  *ROOT can be used as a special value.
  • replace_file - Specify *YES (default) to replace a file if it exists when uploading it or *NO to add another file with the same name if the file already exists.
  • convert_file - Specify if you wish to convert the file to it's Google Doc format after uploading.
  • ccsid - The CCSID to use.  The default is 1252.
  • debug - Specify *YES to turn on debug, or *NO to turn off debug.  The default is *NO.
  • debug_file - Specify the fully qualified file name for the main debug file.  The default is /tmp/g4g_[id]_upload.txt

Comments