Fehler bei rename / move object behoben
This commit is contained in:
@@ -6,7 +6,8 @@
|
|||||||
"Bash(sed -n '420,438p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
"Bash(sed -n '420,438p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
||||||
"Bash(sed -n '465,478p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
"Bash(sed -n '465,478p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
||||||
"Bash(sed -n '523,535p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
"Bash(sed -n '523,535p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
||||||
"Bash(sed -n '582,600p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")"
|
"Bash(sed -n '582,600p' \"C:\\\\src\\\\Galabau\\\\glb-spielwiese\\\\database\\\\packages\\\\pck_net_storage.pkb\")",
|
||||||
|
"WebFetch(domain:docs.public.oneportal.content.oci.oraclecloud.com)"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ create or replace package body pck_net_storage as
|
|||||||
------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------
|
||||||
-- MA Datum Änderung
|
-- MA Datum Änderung
|
||||||
-- SCK 2026-04-08 Funktion erstellt
|
-- SCK 2026-04-08 Funktion erstellt
|
||||||
|
-- SCK 2026-04-16 empty_blob()/empty_clob() als Default entfernt — APEX OCI-Signing braucht null für nicht genutzte Body-Parameter
|
||||||
------------------------------------------------------------------------------------------------Kopf*/
|
------------------------------------------------------------------------------------------------Kopf*/
|
||||||
is
|
is
|
||||||
l_response clob;
|
l_response clob;
|
||||||
@@ -128,14 +129,17 @@ create or replace package body pck_net_storage as
|
|||||||
l_header_index := l_header_index + 1;
|
l_header_index := l_header_index + 1;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
/*
|
||||||
-- Content-Length immer mitsenden (OCI-Signing erfordert es bei PUT/POST,
|
-- Content-Length immer mitsenden (OCI-Signing erfordert es bei PUT/POST,
|
||||||
-- 0 bei bodylosem Request ist valide)
|
-- 0 bei bodylosem Request ist valide)
|
||||||
if i_body_blob is not null and dbms_lob.getlength(i_body_blob) > 0
|
if i_body_clob is not null
|
||||||
then
|
then
|
||||||
l_content_length := dbms_lob.getlength(i_body_blob);
|
l_content_length := coalesce(dbms_lob.getlength(i_body_clob), 0);
|
||||||
elsif i_body_clob is not null and dbms_lob.getlength(i_body_clob) > 0
|
apex_debug.info('clob content length: ' || l_content_length);
|
||||||
|
elsif i_body_blob is not null
|
||||||
then
|
then
|
||||||
l_content_length := dbms_lob.getlength(i_body_clob);
|
l_content_length := coalesce(dbms_lob.getlength(i_body_blob), 0);
|
||||||
|
apex_debug.info('blob content length: ' || l_content_length);
|
||||||
else
|
else
|
||||||
l_content_length := 0;
|
l_content_length := 0;
|
||||||
end if;
|
end if;
|
||||||
@@ -143,17 +147,40 @@ create or replace package body pck_net_storage as
|
|||||||
apex_web_service.g_request_headers(l_header_index).name := 'Content-Length';
|
apex_web_service.g_request_headers(l_header_index).name := 'Content-Length';
|
||||||
apex_web_service.g_request_headers(l_header_index).value := l_content_length;
|
apex_web_service.g_request_headers(l_header_index).value := l_content_length;
|
||||||
l_header_index := l_header_index + 1;
|
l_header_index := l_header_index + 1;
|
||||||
|
*/
|
||||||
|
|
||||||
|
-- nur für BLOB (z.B. leerer Ordner) Content-Length setzen
|
||||||
|
if i_body_blob is not null
|
||||||
|
then
|
||||||
|
l_content_length := coalesce(dbms_lob.getlength(i_body_blob), 0);
|
||||||
|
apex_web_service.g_request_headers(l_header_index).name := 'Content-Length';
|
||||||
|
apex_web_service.g_request_headers(l_header_index).value := l_content_length;
|
||||||
|
l_header_index := l_header_index + 1;
|
||||||
|
end if;
|
||||||
|
|
||||||
apex_debug.info('url: ' || i_url);
|
apex_debug.info('url: ' || i_url);
|
||||||
|
|
||||||
l_response := apex_web_service.make_rest_request(
|
if i_body_clob is not null
|
||||||
p_url => i_url
|
then
|
||||||
,p_http_method => i_method
|
apex_debug.info('Clob Request Body used:');
|
||||||
,p_body => coalesce(i_body_clob, empty_clob())
|
apex_debug.info(i_body_clob);
|
||||||
,p_body_blob => coalesce(i_body_blob, empty_blob())
|
l_response := apex_web_service.make_rest_request(
|
||||||
,p_credential_static_id => pck_system.f_get_par_wert_by_programmid('NETSTORE_CRED_ID')
|
p_url => i_url
|
||||||
,p_wallet_path => pck_system.f_get_par_wert_by_programmid('NETSTORE_WALLET_PATH')
|
,p_http_method => i_method
|
||||||
);
|
,p_body => i_body_clob
|
||||||
|
,p_credential_static_id => pck_system.f_get_par_wert_by_programmid('NETSTORE_CRED_ID')
|
||||||
|
,p_wallet_path => pck_system.f_get_par_wert_by_programmid('NETSTORE_WALLET_PATH')
|
||||||
|
);
|
||||||
|
else
|
||||||
|
apex_debug.info('BLOB Request Body used! Length: ' || dbms_lob.getlength(i_body_blob));
|
||||||
|
l_response := apex_web_service.make_rest_request(
|
||||||
|
p_url => i_url
|
||||||
|
,p_http_method => i_method
|
||||||
|
,p_body_blob => i_body_blob
|
||||||
|
,p_credential_static_id => pck_system.f_get_par_wert_by_programmid('NETSTORE_CRED_ID')
|
||||||
|
,p_wallet_path => pck_system.f_get_par_wert_by_programmid('NETSTORE_WALLET_PATH')
|
||||||
|
);
|
||||||
|
end if;
|
||||||
|
|
||||||
l_status := apex_web_service.g_status_code;
|
l_status := apex_web_service.g_status_code;
|
||||||
|
|
||||||
@@ -734,13 +761,15 @@ create or replace package body pck_net_storage as
|
|||||||
into l_body
|
into l_body
|
||||||
from dual;
|
from dual;
|
||||||
|
|
||||||
-- TEST
|
apex_debug.info('Request Body:');
|
||||||
--l_response := f_make_request(
|
apex_debug.info(l_body);
|
||||||
-- i_method => 'POST'
|
|
||||||
-- ,i_url => f_build_url(i_action => 'renameObject')
|
l_response := f_make_request(
|
||||||
-- ,i_body_clob => l_body
|
i_method => 'POST'
|
||||||
-- ,i_content_type => 'application/json'
|
,i_url => f_build_url(i_action => 'renameObject')
|
||||||
--);
|
,i_body_clob => l_body
|
||||||
|
,i_content_type => 'application/json'
|
||||||
|
);
|
||||||
|
|
||||||
l_obj_path := f_split_object_key(i_object_key);
|
l_obj_path := f_split_object_key(i_object_key);
|
||||||
pck_log.p_info(
|
pck_log.p_info(
|
||||||
|
|||||||
@@ -18,11 +18,11 @@ end;
|
|||||||
|
|
||||||
declare
|
declare
|
||||||
begin
|
begin
|
||||||
for rec in (select object_name, object_size, last_modified, is_folder
|
for rec in (select object_key, object_size, last_modified, is_folder
|
||||||
from pck_net_storage.f_list_objects (i_parent_folder => 'testmandant-42/BA/Eingang/Verarbeitet 2026/', i_include_subfolders => 'N')) --i_parent_folder => 'testmandant-42/BA/Eingang/Verarbeitet 2026/'
|
from pck_net_storage.f_list_objects (i_parent_folder => 'testmandant-42/BA/Eingang/Verarbeitet 2026/', i_include_subfolders => 'N')) --i_parent_folder => 'testmandant-42/BA/Eingang/Verarbeitet 2026/'
|
||||||
loop
|
loop
|
||||||
--dbms_output.put_line('Obj: ' || rec.object_name || ', object_size: ' || rec.object_size || ', last_modified: ' || rec.last_modified|| ', is_folder: ' || rec.is_folder);
|
--dbms_output.put_line('Obj: ' || rec.object_name || ', object_size: ' || rec.object_size || ', last_modified: ' || rec.last_modified|| ', is_folder: ' || rec.is_folder);
|
||||||
dbms_output.put_line('is_folder: ' || rec.is_folder || ', name: ' || rec.object_name || ', object_size: ' || rec.object_size || ', last_modified: ' || to_char(rec.last_modified, 'DD.MM.YYYY HH24:MI:SS'));
|
dbms_output.put_line('is_folder: ' || rec.is_folder || ', name: ' || rec.object_key || ', object_size: ' || rec.object_size || ', last_modified: ' || to_char(rec.last_modified, 'DD.MM.YYYY HH24:MI:SS'));
|
||||||
end loop;
|
end loop;
|
||||||
end;
|
end;
|
||||||
/
|
/
|
||||||
Reference in New Issue
Block a user