Excellent Louis, Thanks for sharing this.
Yes I think that for this case (CKEditor Image), this is the best solution (because of the simplicity).
For other use cases, with a lot of file uploads by users, we definitely need to avoid the files handling by the database and send the files directly from the browser to the cloud storage...
Nice! This is now my reference document for APEX CKEditor image handling in the cloud.
Thank you very much, Louis. I followed your instruction and add some changes.
declare l_response dbms_cloud_oci_obs_object_storage_create_preauthenticated_request_response_t; l_result dbms_cloud_oci_object_storage_preauthenticated_request_t; l_details dbms_cloud_oci_object_storage_create_preauthenticated_request_details_t; l_url varchar2(4000); preauth_request_error exception; begin l_details := dbms_cloud_oci_object_storage_create_preauthenticated_request_details_t; l_details.name := 'standard-' || sys_guid(); l_details.bucket_listing_action := 'Deny'; l_details.object_name := null; l_details.access_type := 'AnyObjectRead'; l_details.time_expires := systimestamp + interval '1' day; l_response := dbms_cloud_oci_obs_object_storage.create_preauthenticated_request ( namespace_name => :G_NAMESPACE , bucket_name => :G_BUCKET , create_preauthenticated_request_details => l_details , region => :G_REGION , credential_name => :G_CREDENTIAL ); if l_response.status_code != 200 then raise preauth_request_error; end if; l_result := l_response.response_body; l_url := 'objectstorage.& || :G_REGION || '.oraclecloud.com' || l_result.access_uri; return l_url; end;if ( data.attributeNewValue ) { if ( data.attributeNewValue.startsWith("&G_OBJECT_STORAGE_URL.")) { data.attributeNewValue = data.attributeNewValue.replace("&G_OBJECT_STORAGE_URL.","&G_PREAUTH_URL."); } }I hope you find it interesting.