#g4gdrv_upload
*//////////////////////////////////////////////////////////////*
* #g4gdrv_upload - Upload File *
* *
* Output: *
* out_id - The id of the folder/file created or uploaded. *
* out_errMsg - The error message (if error exists). If no *
* error exists this value will contain the name of the *
* file or folder that was uploaded. *
* *
* 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. *
* parent_id - Specify the parent ID of the folder you want *
* to upload the file to, if known. *
* 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 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. *
* convert_file - Specify *YES to convert the file to a *
* Google Docs format. *
* create_parents - Specify *YES to create the parent *
* directories if they don not exist. *
* The default is *NO. *
* 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_id 256 Options(*NOPASS)
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:
- Folder or file ID that was created or uploaded.
- 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.
- parent_id - Specify the folder ID of the folder you wish to upload to. This can be used in place of upload_to_folder.
- 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, *NO to cancel if the file already exists or *ADD 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
*//////////////////////////////////////////////////////////////*
* #g4gdrv_upload - Upload File *
* *
* Output: *
* out_id - The id of the folder/file created or uploaded. *
* out_errMsg - The error message (if error exists). If no *
* error exists this value will contain the name of the *
* file or folder that was uploaded. *
* *
* 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. *
* parent_id - Specify the parent ID of the folder you want *
* to upload the file to, if known. *
* 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 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. *
* mime_type - Specify a valid Google mime type to convert *
* the uploaded file to a Google Docs format. *
* create_parents - Specify *YES to create the parent *
* directories if they don not exist. *
* The default is *NO. *
* 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_id 256 Options(*NOPASS)
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:
- Folder or file ID that was created or uploaded.
- 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.
- parent_id - Specify the folder ID of the folder you wish to upload to. This can be used in place of upload_to_folder.
- 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, *NO to cancel if the file already exists or *ADD to add another file with the same name if the file already exists.
- mime_type - Specify a valid Google mime type if you wish to convert the file to it's Google Doc format after uploading. See https://developers.google.com/drive/api/v3/mime-types for a full list.
- 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