When I created a page on APEX 5 to upload a file the apex_application_temp_files
is empty and its not letting me insert the file into my custom table.
I have this as my code
INSERT INTO custom_table(
name,
filename,
mime_type,
content,
file_type,
file_description,
upload_by,
upload_date)
SELECT name,
filename,
mime_type,
blob_content,
:P1_FILETYPE,
null,
:APP_USER,
sysdate
FROM apex_application_temp_files
WHERE 1=1
AND name = :P1_FILEBROWSER;
When I click my button the table doesn't have a value. I'm executing the pl/sql code on a dynamic action when the button UPLOAD
is clicked.
I tried this to see if the dynamic action was working and it is, but I don't know how to get the filename, mime type and name from the file browser if there is nothing on the apex_application_temp_files
table.
See the code that worked below but it doesn't get me the name, filename and mime type.
How can I fix this?
INSERT INTO custom_table(
name,
filename,
mime_type,
content,
file_type,
file_description,
upload_by,
upload_date)
values ( 'name',
'filename',
'mime',
:P1_FILEBROWSER,
:P1_FILETYPE,
null,
:APP_USER,
sysdate
);