[Home] [Help]
317: * procedure to authenticate the upload and move the blob into the
318: * fnd_lobs table. The new generated file_id is returned to the caller.
319: *
320: * access_id The access identifier that authorized the upload
321: * file_name The file_name as stored in the fnd_lobs_document table
322: * by WebDB...the value of the file type input field.
323: * program_name The application short name to record
324: * program_tag The application tag to record
325: * expiration_date The expiration date to record; typically, this is null
378:
379: -- bug 3045375, added select to get length of BLOB.
380: select dbms_lob.getlength(blob_content), mime_type
381: into bloblength, mt
382: from fnd_lobs_document
383: where name = confirm_upload.file_name
384: and rownum=1;
385:
386: -- bug 3045375, added if to check length of blob.
425: confirm_upload.program_name,
426: confirm_upload.program_tag,
427: confirm_upload.language,
428: fnd_gfm.set_file_format(mt)
429: from fnd_lobs_document ld
430: where ld.name = confirm_upload.file_name
431: and rownum=1);
432:
433: if (sql%rowcount <> 1) then
448: else
449: -- bug 9276419 - indicate a restricted file by returning -3
450: fid := -3;
451: end if;
452: delete from fnd_lobs_document;
453: delete from fnd_lobs_documentpart;
454: end if;
455: end if;
456: return fid;
449: -- bug 9276419 - indicate a restricted file by returning -3
450: fid := -3;
451: end if;
452: delete from fnd_lobs_document;
453: delete from fnd_lobs_documentpart;
454: end if;
455: end if;
456: return fid;
457: exception
455: end if;
456: return fid;
457: exception
458: when others then
459: delete from fnd_lobs_document;
460: delete from fnd_lobs_documentpart;
461:
462: fnd_gfm.err_msg('confirm_upload');
463: raise;
456: return fid;
457: exception
458: when others then
459: delete from fnd_lobs_document;
460: delete from fnd_lobs_documentpart;
461:
462: fnd_gfm.err_msg('confirm_upload');
463: raise;
464: end;