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)

Upload Report:

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.