Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Blob upload error: ora-29285 file write error

Er.RJSep 15 2017 — edited Sep 22 2017

Hello All,

Oracle 11g R2 Apex 5.0

i have created blob upload but when i try to upload i get error for few files & few files uploaded successfully.

Error is : ora-29285 file write error

i am using file browse item: (P10_Upload)

a2.jpg

Upload Report:

a4.jpg

Upload process:

declare

l_blob blob;

l_filename varchar2(500);

begin

select blob_content,filename

into l_blob,l_filename

from apex_application_files

where name=:P10_Upload;

blob_to_file (l_blob,'UPLOAD_DIR',l_filename);

commit;

end;

Blob to file Procedure:

create or replace PROCEDURE blob_to_file (

    p\_blob      IN BLOB,

    p\_directory IN VARCHAR2,

    p\_filename  IN VARCHAR2

)

IS

    l\_fp utl\_file.file\_type;

    l\_amt    INTEGER DEFAULT 32000;

    l\_offset INTEGER DEFAULT 1;

    l\_length INTEGER DEFAULT NVL(dbms\_lob.getlength(p\_blob),0);

BEGIN

    l\_fp := utl\_file.fopen(upper(p\_directory),p\_filename,'w',32760);

    WHILE (l\_offset \< l\_length)

    LOOP

     utl\_file.put\_raw(l\_fp,dbms\_lob.substr(p\_blob,l\_amt,l\_offset),TRUE);

   l\_offset := l\_offset + l\_amt;

    END LOOP;

    utl\_file.fclose(l\_fp);

END blob\_to\_file;

I checked with few solutions, which dint help me

OraFAQ Forum: SQL & PL/SQL ยป ORA-29285: file write error

ORA-29285 - File Write Error

Kindly anyone have solution or guide me where am going wrong.

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2017
Added on Sep 15 2017
2 comments
498 views