Oracle Apex - Read contents of an uploaded txt file

Makar Emelyanov

I am trying to read the contents of a text file that I uploaded using the page item file browser but I cannot figure out how to get the files contents.

I don't need it to be pushed into a table or anything, I just want a string represetation of it in a text area, for example. Or to be stored into a variable so I can process.

Apologies for the vagueness if any. I have tried a few ways but I am not sure, can I get the contents somehow using the WWV_FLOW_FILE?

The only solutions I have seen are using the Wizard region with the data mapping/verification breadcrumbs which is not what I need.

Cristian_I

You can find the uploaded file as a BLOB inside the WWV_FLOW_FILE. If you just want to show it, into lets say a text field named P1_some_text_field, you can simple add a procedure like this on the page where you do the upload:

BEGIN
  SELECT utl_raw.cast_to_varchar2(dbms_lob.substr(blob_content))
  INTO :P1_some_text_field
  FROM wwv_flow_files
  WHERE created_on =
    (SELECT MAX(created_on) FROM wwv_flow_files WHERE CREATED_BY = :APP_USER
    );
END;

Please note that this will retrieve at most the fist 32767 characters of your file.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to Read Contents of an Uploaded File

From Dev

display contents of txt file uploaded with ajax

From Dev

How to read a txt file and load the contents into an arraylist?

From Dev

Read txt file and display contents as images javascript

From Dev

How to read a .txt file from terminal, and then extract contents from file?

From Dev

Read Contents of txt file and display in Tkinter GUI Python

From Dev

Returning .txt file contents

From Dev

Returning .txt file contents

From Dev

Read all txt files in a specific folder and write all contents in one txt file

From Dev

Read all txt files in a specific folder and write all contents in one txt file

From Dev

Can we Display the contents of uploaded file in website?

From Dev

How to read the contents of a file

From Dev

Jersey: read uploaded file as JSON

From Dev

Read uploaded JSON file in Rails

From Dev

Save the contents of a qtextedit to .txt file

From Dev

Shuffle and Display the Contents of .txt File

From Dev

display contents of chosen .txt file

From Dev

Shuffle and Display the Contents of .txt File

From Dev

Putting contents of a .txt file into a List in

From Dev

Oracle apex create read only breadcrumb entry

From Dev

Read a txt file into a QStringList

From Dev

Parse uploaded file, then save file contents to database and display to screen(webpage)

From Dev

read the contents of a file upload in java

From Dev

How to read file contents in QML

From Dev

How to read file contents in QML

From Dev

Read contents of .gz file with python

From Dev

How to read the contents of a static file

From Dev

C read contents of file piped in

From Dev

nodejs: Unable to read file contents

Related Related

HotTag

Archive