The G4MSUPLOAD command is used to upload a file from your IBM i (AS/400, iSeries, etc) Integrated File System (IFS) to your Microsoft OneDrive.
Upload File to MS OneDrive (G4MSUPLOAD)
Type choices, press Enter.
MS ID . . . . . . . . . . . . . _______________________________________________________
File to upload . . . . . . . . . _______________________________________________________
File name . . . . . . . . . . . *DFT
File content type . . . . . . . *DFT
Upload to folder . . . . . . . . *ROOT
Replace file . . . . . . . . . . *YES *YES, *NO
Choose new name . . . . . . . . *NO *YES, *NO
Search method . . . . . . . . . *NET *NET, *FILE
Additional Parameters
CCSID . . . . . . . . . . . . . 1252 Number
Debug . . . . . . . . . . . . . *NO *YES, *NO
Debug File . . . . . . . . . . . ______________________________________________________
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Example of Uploading a File to your Microsoft OneDrive
First, prompt the G4MSUPLOAD command and enter your Microsoft ID, the fully qualified path and file to upload as well as the fully qualified path of the directory you want to place the file into on your Microsoft OneDrive. The OneDrive path IS case sensitive.
In this example, we will upload a file from our IFS named /tmp/test.pdf to the /Documents folder in our OneDrive.
G4MSUPLOAD ID(bvstone@outlook.com) STMF('/tmp/test.pdf') TOFLR('/Documents')
If the command completes normally, you should now see the file available in your OneDrive folder:
If you want to have more than one copy of the file, unlike Google Drive, Microsoft OneBox doesn't allow two files with the same file name on the site. Instead, you can either specify a new file name when uploading or you can tell OneDrive to automatically rename the file:
G4MSUPLOAD ID(bvstone@outlook.com) STMF('/tmp/test.pdf') TOFLR('/Documents') REPLACE(*NO) CNEWNAME(*YES)
When done, you will notice the new file, in this case "test 1.pdf":