- User Guide
- Data Administration
- File Upload and Download Utility
- File Upload Automation
- Automating the File Upload Process Using File Upload Utility
- Executing the File Upload Automation Script
3.3.3.5.1 Executing the File Upload Automation Script
File Upload Automation script assists you to upload the files seamlessly.
- Extract the FILEUPLOAD_UTIL.zip file located in the $HOME directory.
- Copy the Data Loader input file (text file) to the $HOME/FILEUPLOAD_UTIL directory.
- Edit the script Env_setup.sh file to update the following environment
variables.
- IDCS URL - The Service Instance URL to access your
IDCS console.
You can get the IDCS URL from the following menu:
Oracle Cloud Infrastructure Console > Identity Cloud.
Syntax:
<idcs-url>/oauth2/v1/token
- Encoded - The <OAuth Client ID>:<OAuth Client
Secret> encoded using base64encode
To extract and encode the Client ID and Client Secret, refer to the following steps:
- Login to Admin Console.
- Go to System Configuration tab, and click Component Details tile.
- Click OAUTH Creds tab to view and copy the OAUTH Client ID and OAUTH Client Secret details.
- Using any base64encode utility, encode
<OAUTH Client ID>:<OAUTH Client Secret>.
Example (Input OAUTH Client ID and Client Secret):
ftptenant-prd_APPID:99140e14-4d30-4e86-85fb-09501fe45fe0
Example (Encoded OAUTH Client ID and Client Secret):
ZnRwcWExMDEyMzEtcHJkX0FQUElEOjBkMmU5MDBiLTlhYjItNGFmOS05OWM0LTEwNTYyMDVkYWYwNQ==
- Username - The Username to access the application.
Note:
The user should have appropriate roles and privileges. For more information about roles and priveleges, refer to Roles and Functions. - Password - The password to login to the application.
- Tenant - The tenant associated with the application.
- PBSM Host - Details of the PBSM host on which the application is
hosted.
Sample Env_setup.sh
IDCS_URL=https://idcs-xyz123.identity.c9xyz.oc9xyz.com/oauth2/v1/token ENCODED=ZnRwbWFydXAxNDIyMzEtcHJkX0FQUElEOjk5MTQwZTE0LTRkMzAtNGU4Ni04NWZiLTA5NTAxZmU0NWZlMA== USERNAME=<user_name> PASSWORD=<password> TENANT=<tenant-prd> PBSMHOST=dc.pbsmcloud.us-xxxxx -1.ocs.oc-test.com
- IDCS URL - The Service Instance URL to access your
IDCS console.
- Execute PBSMCS_PAR_fileupload.sh with the following
parameters –
- filename - The file to be uploaded
- filesize - The file size in Bytes
- Mimetype - The mimetype of the file.
Format:
Filename<space>Filesize<space>mimetype
Example:
./PBSMCS_PAR_fileupload.sh input_20150101_filename_example_8007.txt 334 text/plain
This script generates the access token and the PAR URL. It also uploads the file into the object store and scans the file too.
Note:
To upload multiple files, you must execute the script for each file, separately.Once the script is executed succesfully, the file is uploaded and added to the list of files in the File Upload/Download page. To access the File Upload/Download page refer to Upload or Download File from Object Store Using Console.