I use the apex oracle, I have an api (post), with the help of which I write a photo in my database oracle, but I want to go through a bit, I want the photo that comes to me immediately sent to the base of the mongoDB, not writing in my database is it possible to do this ??? , I will be grateful for your help
v_blob blob := p_blob;
v_clob CLOB;
json_table apex_json.t_values;
v_event_id varchar2(300);
V_SNAPSHOT blob;
json_lob clob;
v_id NUMBER;
BEGIN
v_clob := iot_general.BLOB_TO_CLOB(v_blob);
apex_json.parse(json_table, v_clob);
v_event_id := apex_json.get_varchar2(p_path => 'event.id', p_values => json_table);
V_JSON64 := apex_json.get_clob (p_values => json_table, p_path => 'snapshot', p0 => 3);
V_SNAPSHOT := iot_general.clob_base64_to_blob (p_clob => V_JSON64);
INSERT INTO IOT_TELEMETRY_SNAPSHOTS
(EVENT_ID, MYFILE)
VALUES
(v_event_id,V_SNAPSHOT)
v_blob blob := p_blob;
v_clob CLOB;
json_table apex_json.t_values;
v_event_id varchar2(300);
V_SNAPSHOT blob;
json_lob clob;
v_id NUMBER;
BEGIN
v_clob := iot_general.BLOB_TO_CLOB(v_blob);
apex_json.parse(json_table, v_clob);
v_event_id := apex_json.get_varchar2(p_path => 'event.id', p_values => json_table);
V_JSON64 := apex_json.get_clob (p_values => json_table, p_path => 'snapshot', p0 => 3);
V_SNAPSHOT := iot_general.clob_base64_to_blob (p_clob => V_JSON64);
if V_JSON64 is not null
then
apex_web_service.g_request_headers(1).name := 'Content-Type';
apex_web_service.g_request_headers(1).value := 'application/x-www-form-urlencoded';
l_clob_post := apex_web_service.make_rest_request(
p_url => 'http://myMachine/myService',
p_http_method => 'POST',
p_parm_name => apex_util.string_to_table('param1:param2'),
p_parm_value => apex_util.string_to_table('xyz:xml'));
end if