apex_application_temp_files的问题 [英] issue with apex_application_temp_files

查看:211
本文介绍了apex_application_temp_files的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,在我的ORACLE APEX应用程序中,我想要一种文件上传机制,该机制可以将上载的.zip文件作为参数发送给某些函数(该函数运行良好,我通过手动从数据库进行输入对其进行了测试).问题是,当我尝试在一个过程中从"apex_application_temp_files"中选择上传的文件时,它会抛出异常"NO DATA FOUND",但是当我向选择ID和FILENAMES的应用程序添加报告时,我看到了该文件...发生了吗? 很抱歉,这是一个琐碎的问题,但是对于APEX开发,我还是一个新手.

I have a problem, in my ORACLE APEX app, I want to have file uploading mechanism that send uploaded .zip file as parameter to some function (that function works well, I tested it by manual feeding from DB). Problem is, when I try to select uploaded file from "apex_application_temp_files" in a process it throws exception "NO DATA FOUND", but when I add report to app where I select ID and FILENAMES I see that file...any idea why this is happen? I am sorry if this is some trivial issue, but I am pretty new in APEX developing.

过程:

declare
    l_blob blob;
begin
    SELECT blob_content
      INTO l_blob
      FROM apex_application_temp_files
      WHERE NAME = :P6_FILE;
    --INSTANTLY SET :G_TEST_ID FOR REPORTS
    :G_TEST_ID := file_management.unwrap_zip(ab_zipped_blob => l_blob);
end;

推荐答案

您需要在NAME列而不是FILENAME上进行选择.前者是唯一标识符(看起来像series_of_numbers\the_filename),是文件浏览项将包含的内容,而后者则没有前缀.

You need to select on column NAME instead of FILENAME. The former is the unique identifier (looks like series_of_numbers\the_filename) and is what the file browse item will contain, while the latter is without the prefix.

看,您必须从头开始提供更多信息.我创建了一个非常简单的页面来尝试此操作(apex.oracle.com).

Look, you'll have to provide more information from your end. I've created a really simple page to try this (apex.oracle.com).

P2_FILE是文件浏览项.

  • 存储类型:表APEX_APPLICATION_TEMP_FILES
  • 在会话结束时清除文件

我创建了一个提交过程,该过程只不过在调试输出中列出了一些内容.

I've created an on-submit process which does nothing more than list some things in the debug output.

declare
    l_blob blob;
begin 
  for r in (select * from apex_application_temp_files)
  loop
    apex_debug.message('name: %s - filename: %s', r.name, r.filename);
  end loop;

  apex_debug.message('P2_FILE: %s', :P2_FILE);

    SELECT blob_content
      INTO l_blob
      FROM apex_application_temp_files
      WHERE name = :P2_FILE;

  apex_debug.message('blob length: %s', dbms_lob.getlength(l_blob));
end;

因此,我运行页面,启用调试,选择一个文件,然后单击提交.所有作品.检查调试日志(接受):

So I run the page, enable debug, select a file and hit submit. All works. Check the debug log (accept):

name: 39044609744029199463/README (2).md - filename: README (2).md
name: 39044529927808550681/README (1).md - filename: README (1).md
name: 39044569042020557797/README.md - filename: README.md
P2_FILE: 39044609744029199463/README (2).md
blob length: 1884

那么:您的端头有什么不同?您是否已按照Jeffrey的建议完成并运行了该页面的调试?您的清除"设置为什么?您确定未找到数据是在选择Blob时发生的,而不是在过程中发生的-您是否已注释掉过程调用?

So: what's different at your end? Have you done as suggested by Jeffrey and run a debug of the page? What is your "purge" set as? Are you sure the no-data-found occurs on select of the blob and not in your procedure - have you commented out your procedure call yet?

这篇关于apex_application_temp_files的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆