Creating a link "Download Media" on a form the apex

Apex 4.2

I have a form based on a table of PEOPLE:

Create table PERSONS
(
Person_Id int,
Name varchar2(100),
Occupation varchar2(100),
Photo_id int
);

The 'PHOTO_ID' field links to our PHOTO_MEDIA table

Create table PHOTO_MEDIA
(
Photo_id int,
File_name varchar2(100),
Mime_type varchar2(100),
Short_desc varchar2(200),
Media blob
);

The form lists information for people. At the Summit, I have an automated extraction process to extract data from the PEOPLE table. I have a problem, a link "Upload media" based on this page. It is quite simple to build a link on the page, but the link to request a popup to download/save the multimedia document is another question. Since I'm the field PHOTO_ID of the PEOPLE table on the form, I tried to question the media of the PHOTO_MEDIA table, but there is a conflict of data types. Get an error in the sense of... 'incompatible data types, expected number, got blob... ". ». I have also studied using apex_util.get_blob_file, but nothing seems to work properly. Any help on this would be greatly appreciated. Thanks in advance.

Yes you are right.  You will need to create a region (the model any that it does not display), you will need the P900_ID element to receive the value.

In the process, you declare the variables and make your own selection.  You do not need or want an automatic extraction process.

The code of your process will probably look like this:

declare
  l_file_name   photo_media.file_name%type;
  l_mime_type   photo_media.mime_type%type;
  l_media       photo_media.media%type;
begin
  select file_name
       , mime_type
       , media
    into l_file_name
       , l_mime_type
       , l_media
    from photo_media
   where photo_id = :P900_ID;

  htp.init;
  owa_util.mime_header(l_mime_type,false);
  htp.p('Content-Length: ' || dbms_lob.getlength(l_media));
  htp.p('Content-Disposition: attachment; filename=' || l_file_name || ';');
  owa_util.http_header_close; 

  wpg_docload.download_file(l_media);
  apex_application.stop_apex_engine;
end;

Thank you

-Jorge

Tags: Database

Similar Questions

  • I tried several times to download Media Encoder CC through the creative cloud without success. What can I do next?

    What should I do to solve this problem and get the downloaded Media Encoder. I clicked on the link "More" in the download of creative cloud utility and that is what is returned to me.

    Exit code: 6

    Please see specific errors below for troubleshooting. For example, the ERROR:

    -------------------------------------- Summary --------------------------------------

    -0 fatal Error (s), 2 error (s)

    -Payload: Package redistributable Microsoft Visual C++ 2012 (x 64) 11.0.61030.0 {3E272A93-C06B-4206-AD02-0EBE02535E20}.

    ERROR: third charge useful Installer vcredist_x64.exe failed with exit code: 2147942750

    ERROR: Failure of the Package redistributable Microsoft Visual C++ 2012 (x 64) to repair. Please try to fix it by double-clicking the executable file to "C:\Users\TLUTTR~1\AppData\Local\Temp\{5CBDA4AA-FE6D-411F-8EF3-A4B3A625BC9D}\AdobeMediaEn Media Encoder CC VC 2012 Redist (x 64) 2014\payloads\Microsoft coder_8_LS20\Adobe \vcredist_x64.exe ', or download and install the 2012 Microsoft Visual C++ Redistributable Package last (x 64) Microsoft Web site - www.microsoft.com

    -------------------------------------------------------------------------------------

    Code 6 & Code 7 http://helpx.adobe.com/creative-suite/kb/errors-exit-code-6-exit.html

    or

    A chat session where an agent can remotely look inside your computer can help

    Cloud creative support chat (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • How to allow users to download media on a form online

    Hello world:

    I use webforms in a protected area to collect contributions from project and content of members.

    Web Apps allow you to image fields, but it isn't an obvious "rich text" field for downloaded files or another type of similar scope.

    The ideal would be to allow members to transfer multimedia files via multimedia and stored (or displayed) module with the recording of content.

    Still, it would be 'good' to allow members to upload attached files that could be viewed by other members.

    I can't understand how access to the multimedia module in the way that Web applications allow an entry.

    What Miss me?

    Done almost with development... it would be a big step forward!

    Thanks in advance!

    Linda

    Hey Linda, the upload of image can also manage other downloads

  • link to clickable e-mail in the apex report

    Hello

    I have the emails of information to store in a table and would like to make this clickable email.
    Is this possible? How?

    I've been able to do in forms, but don't know how it might be made on the classic interactive reports.

    Thank you very much for your help!
    LC

    You can change your column attributes in your interactive report.

    Set your text link "Email User" or what you want... If you want the text to be the email address then it would #COLUMN_NAME # (substitute COLUMN_NAME column name that contains the e-mail address.
    In the column link section set your target URL
    In the URL field, you can set it to mailto:#COLUMN_NAME#

    I hope this helps.

  • Download of previous versions of the Apex

    Hello

    We need to install Apex 4.0 on a test system and executing an upgrade to Oracle Apex 4.1 to ensure management that we can upgrade properly. My question is where can I download Apex 4.0?

    Thank you

    Http://www.Oracle.com/technetwork/developer-tools/Apex/application-express/all-archives-099381.html here

  • Cannot download media such as songs, videos content.

    I use INTEX Cloud fx.
    I am not able to download songs, videos, and also some documents... When I try, automatically the streaming content start instead of download... pls help me to solve my problems...
    Thank you..

    Hi maheshmeshram99,

    For more instructions on how to download media, you can consult the following Knowledge Base article:

    I hope this helps! Please let us know if you have any other questions.

    Thank you

    -Ralph

  • Syntax of the apex to create edit link

    Apex 4.2

    I have a report that I'm working on that uses a custom edit link embedded in the query. The query along the lines of:

    SELECT
    first_name as FIRST,
    last_name as LAST,
    '<a href="f?p=&APP_ID.:67:APP_SESSION.::::P67_PERSON_ID:#PERSON_ID#"><img src = "/i/edit.gif" alt=""></a>' as LINK_COLUMN
    FROM PERSONS
    

    I want to report link to the information page (Page 67; report is on page 66). However, there is a problem with the syntax. On the report, I can click on the link for each line. It'll take me to the next page, but his has not managed the information on the next page, based on the past PERSON_ID.

    I think another way would also use javascript.apex: submit {} but I'm not as familiar with this syntax as well. I did some searching on google but I encounter difficulties still generate this link.

    Any help on this would be greatly appreciated. Thanks in advance.

    You mix the Apex syntax (like token #PERSON # and & substitution variables) with SQL syntax - and expect that everything works like magic.

    The syntax of the token # is applicable only in the column properties (for example, the definition of HTML column or column URL/link definition) in a report of the Apex. It has no meaning in SQL.

    If you want to generate the URL under the projection of the SQL then use:

    select
      first_name as FIRST,
      last_name as LAST,
      '' as URL
    from persons
    

    And as Frank commented - please use the correct forum area in the future when ask what apex questions.

  • Create a link that will download a file

    Hello

    How can I create a link that when clicked, will be brink a save dialog box under which will save a picture I want to for the user to download?  I'd rather do that instead of having the image pop up, then the user has a right click and click on Save Image as.  Thank you.

    This help you?

    http://forums.Adobe.com/thread/838827

    Nancy O.

    ALT-Web Design & Publishing

    Web | Graphics | Print | Media specialists

    http://ALT-Web.com/

    http://Twitter.com/ALTWEB

    http://ALT-Web.blogspot.com/

  • How to create a link to download a .psd or .eps file

    I'm trying to create a link to a file for a user to download .psd. Whenever I have a link to the .psd file, Dreamweaver wants to convert into a JPEG file. Is there a way to post a link to a .psd file to create the user to download this file? I am currently having files that retain the original Photoshop elements (layers, channels, etc.) used to create the file. I want to do the same thing with .eps files, but who have not tried yet. Any thoughts?

    Zipper.   http://www.7-zip.org/ - for windows.

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    www.Alt-Web.com/
    www.Twitter.com/ALTWEB

  • Is there a download from Microsoft which will create a bootable usb media that does not have the drivers?

    Original title: A bootable Windows 7 media

    I work on a Lenovo 2-in-1 with Windows 7 (for games) and 10 (for a normal use) Windows to dual-boot. I created a USB stick with Windows 7 Pro (64 bit) of a legitimate Windows 7 Pro disc. The computer starts on the usb device and plays normally, however, one of the steps asks a driver for cd/dvd and this 2-in-1 (Lenovo Flex 3) doesn't have a built-in CD/DVD. All other drivers are located in a folder system. My question is, given my key Windows 7 can I create a new bootable media that does not demand drivers? Is there a download from Microsoft which will create a bootable usb media that does not have the drivers? I know that I can reinstall the drivers manually after the installation.

    Thank you

    Matt Armshaw

    Windows 7 or Windows 10 come preinstalled?

    If you install Windows 7 on a system that is preinstalled with Windows 10, you must do the following before:

    -Disable the secure boot UEFI

    -Disable the quick start

    -L' install created media can be corrupted.

    How to: Dual Boot Windows 7 or Windows 8 with Windows installed 10 first

    I suggest that you try to create another bootable copy.

  • ? Adobe digital editions4.5:check:activation error; Book downloaded from kobo creates a link url of ASMC. try to open it in dig.edit. results in the activation error; List IDS allowed adobe to dig. Edit shows the same email that you used for download Kobo

    ? Adobe digital editions4.5:check:activation error; Book downloaded from kobo creates a link url of ASMC. try to open it in dig.edit. results in the activation error; List IDS allowed adobe to dig. Edit shows the same email that you used for download Kobo.

    The operating system that you used?

  • Online form to allow clients to submit a web application and create "Catégories" and affect one area secure the data provided?

    Is it possible a customer filling out a form with some information, that adds data to a web application - but at the same time it creates 6 x 'categories' and affects an area secure web application that has been submitted (by selecting a drop down current secure areas).

    That's what I'm trying to do.

    I have a client that handles the different places.  They download media THAT PDF reports in British Colombia through media downloads and fix them so only those with the correct secure area members to see.  It is then the client has a web application that lists all of the locations.  Each of them has 6 x sets of unique documents that must be downloaded and read by site.   Currently I have added 6 new categories in the admin settings, then go to the web application and manually add the code for the category of support library code appropriate.

    Ideal process:

    1 / the customer logs on to an online form to create a new location - they fill in a few fields of info (name or location, address, etc.)

    2 / they choose a "Secure Zone" that the location belongs to a loss of worms down

    Form 3 / hidden fields and then creates 6 x new categories and place the ID numbers of the category in the web application for the location

    Think I'm too ask a lot... but you never know?

    HI Mel,

    Don't know how to go about this configuration, create categories of the front-end webapps and secure zone allocation is not something you (as a visitor of a site) can do.

  • How do I create a link to a WordPress Blog?

    I just downloaded WordPress via Fantastico; Now, I want to integrate WordPress into my Web site. I understand that I have to create a link on my Web site to accomplish. Could someone give me a brief lesson step by step on how to do this?

    Most likely, your WordPress files were installed in a subfolder of your domain.

    yourdomain.com/WP/

    An absolute URL to the WP to index page might look like this:

    http://yourdomain.com/WP_folder_name/index.php"> link to the WP blog.

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB
    http://ALT-Web.blogspot.com

  • Error: Windows Media Player cannot play the file. The player can not support the Codec that was used to compress the file, MP3 downloads will not play

    Original title: MP3 downloads don't play no not on WMP

    My Windows Media Player recently stopped playing downloads from Amazon. I've never had this problem before. I installed VLC Player, has not worked... off the WMP in the Windows app, restarted, turned on the back and restarted... did not help. I get the message "Windows Media Player cannot play the file. The player may not support the Codec used to compress the file. This is for multiple downloads, so I don't think they would be all corrupted files.

    Hello
     
    Have you done any software or changes to the material on the computer before this problem?
     
    You mentioned that the files do not play on a third-party player as well. I suggest you to check if the files are corrupt.
     
    Method 1:

    How to Download Codecs automatically in Windows Media for Windows XP player

     
    Method 2:

    Resolution of the problems of reading in the Windows Media Player for Windows XP

    Information on the types of media files that supports Windows Media Player

     
    In addition, run the fixit from the link:
     
    Hope the information is useful.
  • AVI. video file play on my Windows Media Player 11 in the form of audio, no picture.

    I'm playing an avi file. movie file on my desktop computer with Windows Media Player 11 on Windows Vista Home Premium 64-bit. When he plays, he plays like an audio file, sound playback, but playing the audio visualization that works with my audio files. How to play the video?

    I'm playing an avi file. movie file on my desktop computer with Windows Media Player 11 on Windows Vista Home Premium 64-bit. When he plays, he plays like an audio file, sound playback, but playing the audio visualization that works with my audio files. How to play the video?

    =====================================
    Chances are you need a codec... the following free utility
    can identify the codec used to create an AVI file:

    Download GSpot
    http://www.free-codecs.com/download/GSpot.htm
    (left-click the text: "Download GSpot")
    (on the next screen...
    left click: 'Download [GSpot 2.70]')

    GSpot Super quick start
    http://www.headbands.com/GSpot/v26x/Quick_Start.html

    Evaluation of video files and Codecs with GSpot
    http://www.windowsmoviemakers.NET/PapaJohn/68/GSpot.aspx

    There is a possibility that you need the XviD codec:

    XviD Codec
    http://www.xvidmovies.com/codec/

    No guarantee, but it might be interesting to try to download
    and install one of the following codec packs:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    * Proceed at your own risk *.

    (1) Windows 7 Codec Pack
    http://download.CNET.com/Windows-7-Codec-Pack/3000-13632_4-10965840.html

    (2) information on CCCP (combined Community Codec Pack)
    http://www.CCCP-project.NET/wiki/index.php?title=Main_Page

    (3) K-Lite Codec Pack (full)
    http://www.filehippo.com/download_klite_codec_pack/

    Good luck...

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

Maybe you are looking for

  • Satellite M30 does not start

    I have a satellite m30 a little more than two years. When I used it one day it started making a "scratching" noise, he locked himself, when I stopped saying something about the emptying of readers (?). now it won't start at all, is simply the "scratc

  • How can I download contacts on iCloud to my iPhone?

    Here's the problem: my phone has never been stored in iCloud. Somehow, I deleted all my contacts from my phone, but (fortunately?) I always see them on my iCloud account. How can I get in my phone?

  • Wiring to something not visible in the current block diagram view

    My entire block diagram is not visible without scrolling.  (I tried to avoid this problem, but it turned out to be impossible).  When I try to connect the two together, how to scroll?  I have not found a way to do it.  Now I'm stuck because I'm unabl

  • Dimensions will not display in 'mm' in 'mil '.

    Hello With the help of MultiSIM Blue: In 'Options' - 'global Options' - 'Dimensions', I can't adjust units "displayed" to "mm". It will only show the dimensions 'millet '. What I am doing wrong? Thank you.

  • HP Laserjet Pro M125a: LaserJet M125a is not printing with Windows XP SP3

    Hello world.Today I bought the new printer. I tried to install this printer on my old pc with Win xp, but the installation pops up the window with warning "software for this device:"printer "has not passed the test with windows xp compatibility syste