Attachment download link

What is the best way to have a download link on a page? I searched for this topic and found a few posts that used h:commandLink. A backing-bean method gets invoked with code something like as follows.
      FacesContext facesContext =  FacesContext.getCurrentInstance();
      HttpServletResponse response = (HttpServletResponse)facesContext.getExternalContext().getResponse();
      response.setHeader("Content-disposition", "attachment; filename=test.txt");
      byte[] bary = .. // get the byte contents
      response.setContentLength(bary.length);
      response.setContentType("application/x-download");
      ServletOutputStream sout = response.getOutputStream();
      sout.write(bary);
      facesContext.responseComplete(); This works except for the problem that after this action other unrelated command buttons on the form invoke the file download again. Some sort of confused state machine that has also been talked about in the couple of posts but without any solutions.
Help! I'm using the latest 1.1_01..

Do not use commandLinks, use commandButtons instead.
You can easily make them appear like a normal link using css.
Thats the easiest way to solve that problem!
Regards
Thomas

Similar Messages

  • Download link not working in Adobe AIR app.

    I wanted to let users browse my site as a desktop application,
    but didn't have the time to write an application from scratch. SO tried following trick. Created a simple Adobe AIR application with a single page. This page redirects to my website and hence loads the website in the AIR window.
    Everything is working fine except that the download links are not working. The download doesn't start. Nothing happens. What is the solution here? Any help is appreciated.

    I am now facing the same problem. I wrote a servlet .
    code like this
             response = (HttpServletResponse) faces.getExternalContext().getResponse();
             response.setContentType("application/x-download");
             String agent = request.getHeader("USER-AGENT");
             boolean isIE=false;            
            if (null != agent && agent.indexOf("MSIE")!=-1) { 
                isIE=true;
            if (isIE) {
                fileName = URLEncoder.encode(fileName, "UTF-8");
            } else {
                fileName = new String(fileName.getBytes("utf-8"), "ISO-8859-1");
            response.setHeader("Content-Disposition","attachment;filename="+fileName);
            ServletOutputStream os = response.getOutputStream();
            byte b[]=new byte[1024];
            int n;
            while((n=in.read(b))!=-1){
                os.write(b,0,n);
           in.close();
           os.close();
    and i open a new window refer to above jsp ,also i set a breakPoint at os.close(),the program has passed through,but nothing happened in the window.
    If i use IE or FF ,the browser will open a small window to allow me select whether open or  save the file.So can anybody give me some advice.Is it because air using webkit engine and the engine does not do this kind of job?
            Thanks.

  • How do I remove download links/button redirect to accurate download

    When I go to some sites that have a download link underscored in blue or a button next to text or any other part of the page, I was able to click and download the file. When you point at the link or button you would see the path it will take to download the file. It would have the website name your visiting plus other codes.
    But on returning to these sites, when I choose what I want to download, the link or button wants to go to accuratedownload.com. It presents the name of the item I want and with a .EXE extension. My main browser is Firefox version 26.0 on my XP PC. I test Internet Explorer and it produces the same results. Something has changed. I go to the site on my mobile phone, I am able to download the file from the same site and the links/buttons are not embedded with codes to go to accuratedownload.com. I do not know what to call this problem since I had no luck in finding solutions to redirection being embedded in a link or button on a web page that worked fine.
    I've tried a reset Firefox, my profile, running Symantec Anti-Virus, Malwarebytes Anit-Malware, Clearing history and so on. The problem still occurs. Need Help.
    Note: It would be nice if when the Download Screen pops-up, that we could rename the download file to a name we want (Saves time). Even if you rename the file, the history should record where it came from with the original name if it needs to be downloaded again.

    To let you know, When I did a reset and restarted Fire Fox without the Add on's. I tested each user account on my PC. Each user account that used Fire Fox or Windows Explorer showed the same symtoms.
    Back to troubleshooting, I've completed a scan using Sothos Free Virus Removal Tool. After a lengthy scan of every drive, partition, USB Thumb Drive and so on that it found, in about 5.5 hours it found Mal/FakeAvCn-C, Mal/JavDlEx-A and CXmal/BadLnk-A and continued by clicking the Clean Up button and that took about 15 minutes for some reason. Then it asked to send the log to Sophos. I clicked send and it failed to get to them.
    I tried going on the internet to test the cleanup by clicking on some links and buttons. I could not get on the internet. I found that the NIC card was not working. Don't know why now but probably was affected by the scan. I found myself troubleshooting and reinstalling NIC drivers several times before the NIC card started to run correctly.
    I read you post and tried to change the proxy settings in Fire Fox to "No Proxy." The scan, clean up and proxy settings change did not remove the embedded paths in links or buttons that allow you to download or be sent to the intended location. It still had paths to accuratedownload.com and eachdownload.com.
    Question: By default is the proxy setting suppose to be "Use system proxy settings"? Should I put this back to this setting.
    Windows Explorer has the same problem. Is Fire Fox a stand alone product or does it build parts of itself using Windows Explorer?
    =========
    Besides the scans and removal done to the registry, the scans it did on the files and folders, the Sophos log shows the virus attached to files in Documents and Folders, All Users (and other user accounts), Application and data folders, Java and Cache, including any shortcuts and long cryptic files like (pg42l784fcuo452hsb6cfbkoke045p75f2e02887m).
    When programs fail to delete or cleanup after themselves, what locations can be safely deleted manually?

  • Creating a file download link on jsp

    I have the following on my jsp. The code worked fine until I tried to use it in a new html design page.
    <code>
    //page name is index.jsp
    try //DISPLAY THE CONTENTS OF THE DATA DIRECTORY
    File dirname = new File(PATH); // create an instance of the File class
    if (dirname.exists()&&dirname.isDirectory())//check to see if File class dirname exists and is valid
    String [] allfiles = dirname.list();//create an array of files in the dirname File class
              for (int i=0; i< allfiles.length; i+=2)//loop through allfiles[] and print out file links
    out.println("<br><table border='1' cellspacing='1' width='99%'>");
                   out.println("<tr><td width='50%' class='pageFont'><input type='checkbox' name='cb' value='"+allfiles[i]+"'>"+allfiles[i]+"      ");
    %>
    <a class="a" href="index.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a></td>
    <% if(i+1 < allfiles.length)//PRINTS OUT THE SECOND TD SO THAT WE HAVE 2 COLUMNS OF LINKS
    out.println("<td width='50%' class='pageFont'><input type='checkbox' name='cb' value='"+allfiles[i+1]+"'>"+allfiles[i+1]+"      ");
    %>
    <a class="a" href="index.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a></td></tr>
    <%
    out.println("</form></font></table>");
    catch (IOException excep)
         out.println("An IO exception has occured.");
    </code>
    Then when clicked this code is run:
    <code>
    try{
    //CHECK TO SEE IF THE FILE HAS BEEN CLICKED TO DOWNLOAD SINGLE FILE
    if (request.getParameter("downfile") != null)
    String filePath = request.getParameter("downfile");
    File f = new File(filePath);//CREATE AN INSTANCE OF THE FILE CLASS AND POINT IT TO THE LOCATION OF THE DIRECTORY CONTAINING THE FILES
    if (f.exists() && f.canRead())
    response.setContentType ("application/octet-stream");
    response.setHeader ("Content-Disposition", "attachment;filename=\""+f.getName()+"\"");
    response.setContentLength((int) f.length());
    BufferedInputStream fileInputStream = new BufferedInputStream(new FileInputStream(f));
    int i;
    out.clearBuffer();
    while ((i = fileInputStream.read()) != -1) out.write(i);
    fileInputStream.close();
    out.flush();
    </code>
    When I click on this link I get the download dialog box. If I open it I get the following open up in notepad(the files I am trying to give download links are .txt files)
    Below is what is displayed in notepad ALL on 1 line:
    <html>
    <head>
    <LINK rel="stylesheet" ty
    That is displayed in all of the links that I click on. It is the first few lines of html code for index.jsp.
    I know this code is probably not a good way of doing what I need but I got it to work fine until the change.
    I am sure there is an easier way to code the download link without resubmitting the page.
    Thanks in advance!!

    Well all was fine with this jsp until I moved it to ApacheJServ. Now the problem has resurfaced(although it is a little different now)
    I had moved the following code to the top of my page:
    //CHECK TO SEE IF EITHER DOWNFILE OR ZIPFILE VARIABLE EXIST, AND IF THEY DO SET CONTENT TYPE BEFORE SENDING ANY HTML CODE TO THE BROWSER
    try{
    //CHECK TO SEE IF THE FILE HAS BEEN CLICKED TO DOWNLOAD SINGLE FILE
        if (request.getParameter("downfile") != null)
                String filePath = request.getParameter("downfile");
                File f = new File(filePath);//CREATE AN INSTANCE OF THE FILE CLASS AND POINT IT TO THE LOCATION OF THE DIRECTORY CONTAINING THE FILES
                    if (f.exists() && f.canRead())
                        response.setContentType ("application/octet-stream");
                        response.setHeader ("Content-Disposition", "attachment;filename=\""+f.getName()+"\"");
                        response.setContentLength((int) f.length());
                        BufferedInputStream fileInputStream = new BufferedInputStream(new FileInputStream(f));
                        int i;
                        out.clearBuffer();
                        while ((i = fileInputStream.read()) != -1) out.write(i);
                            fileInputStream.close();
                            out.flush();
                            response.flushBuffer();
    catch (Exception e){}
    //This is where the java code ends and the javascript/html code begins.Then further into the page I create the file download links like so:
                            <a class="a" href="main.jsp?downfile=C:\\data\\<%=allfiles[i+1]%>">DOWNLOAD</a>I know this isnt a secure way of doing this but I am on a intranet.
    The problem I am having now is that when I click on one of the links and download the file and then open it, I get the contents of the file plus concatenated to the end of it is the first few HTML lines of the actual jsp that I downloaded the file from. Before I was just getting the first few lines of html from the jsp, not the actual contents of the downloaded file.
    This is an example of what I am getting:
    This is the contents of the file that I downloaded.//This is where the file contents ends.
    <html>
    <head>
    <LINK rel="stylesheet" type="text/css" href="default.css">
    <script language="JavaScript1.2">
    //function that allows user to select all checkboxes
    function doIt(v)
    for(var i=0;i<document.form1.cb.length;i++)
       document.form1.cb.checked=eval(v);
    function swap(imageName,image)
    imageName.src = "templateImages/"+image;
    function imageOver(imageSrc, imageName)
         changeImage = new Image();
         changeImage.src = imageSrc;
         document.images[imageName].src = changeImage.src;
    var hide = true;
    function hideShow( ) /
    Any morre ideas?
    TIA!
    BTW, I went to ApacheJServ because they wont let me use tomcat :(

  • Display image for BLOB  Download link in Interactive Report

    I have a table containing BLOB data and am displaying the table in an interactive report. I would like to replace the "Download" text link with an icon that represents the MIME type of the BLOB, but can't seem to find a way to make the substitution. Does anyone know how to do this? Thanks.
    -Jeff

    Hey Ben,
    Thanks for the suggestion. I understand what you are saying, the problem is that when you have an interactive report that includes a BLOB and you use the built-in method for displaying a download link, it only gives you the option of using a text link. The method is outlined in the online help under:
    Home > Advanced Programming Techniques> About BLOB Support in Forms and Reports > About BLOB Support in Reports
    This is done by using the following syntax in the Number/Date Format of the column attribute of the BLOB:
    DOWNLOAD:CC_DOCUMENTS:CONTENTS:ID::MIME_TYPE:FILENAME:UPDATED_ON::attachment:View
    Where the last parameter is the link text. The only problem is that there is no option for substituting an image rather than the link text. That's what I'm trying to work around. Sorry if you new all of this already, but I wanted to explain what I've already done. Thanks for any help you can offer.

  • Problem with download link for a BLOB Column in a "Classic report"

    I am having a problem where I cannot make a download link for a blob column function in a "classic" (non-interactive) report. I went through the tutorial on this topic and it was great help it working out the minor bugs, but I get a 404 error (apex_util.get_BLOB not found). For testing purposes I went ahead and created a an identical report on the same page that is an "Interactive report" and it works like a charm. Same query, same BLOB formatting Mask, pulling data from the same table. So, it really doesn't seem like an issue with the grants, since both reports should be executing as the same user.
    I know it sounds like the obvious answer is to just go with the interactive report and my problem is solved, but the rest of this site uses classic reports, and I don't need the sort features of an interactive report, and the slightly different style of the the report really stands out even if I turn off all the bells and whistles. I don't want to change the css to make them look identical, I just want a regular report to work.

    I eventually found another post: APEX_UTIL.GET_BLOB was not found on this server
    In this post there is the suggestion of putting "dbms_lob.getlength("var")" after the date field in your select. So I changed my query to have it at the end, and now my format mask (DOWNLOAD:table_name:ATTACHED_FILE:FILE_ID::FILE_MIME_TYPE:FILE_NAME:::attachment:Download) works like a charm, in a classic report.

  • Website image and zip file download links not working in Dreamweaver Air application

    Hi
    I have successfully created and AIR app for an existing business website using the Dreamweaver AIR Extension. The site works very well in all respects except for the part where we have high resolution images and zip files available for download. The download links refuse to do anything, and right-click (PC) / ctl-click (Mac) does nto work either.
    I suspect this may be an AIR sandbox/security issue but am I correct and what can I do to fix it?
    Thanks in advance for any assistance you may be able to give.
    Martin

    I am now facing the same problem. I wrote a servlet .
    code like this
             response = (HttpServletResponse) faces.getExternalContext().getResponse();
             response.setContentType("application/x-download");
             String agent = request.getHeader("USER-AGENT");
             boolean isIE=false;            
            if (null != agent && agent.indexOf("MSIE")!=-1) { 
                isIE=true;
            if (isIE) {
                fileName = URLEncoder.encode(fileName, "UTF-8");
            } else {
                fileName = new String(fileName.getBytes("utf-8"), "ISO-8859-1");
            response.setHeader("Content-Disposition","attachment;filename="+fileName);
            ServletOutputStream os = response.getOutputStream();
            byte b[]=new byte[1024];
            int n;
            while((n=in.read(b))!=-1){
                os.write(b,0,n);
           in.close();
           os.close();
    and i open a new window refer to above jsp ,also i set a breakPoint at os.close(),the program has passed through,but nothing happened in the window.
    If i use IE or FF ,the browser will open a small window to allow me select whether open or  save the file.So can anybody give me some advice.Is it because air using webkit engine and the engine does not do this kind of job?
            Thanks.

  • Securing file download links

    As per the File upload/download How-to at http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14377/up_dn_files.htm#sthref153
    downloading a file involves writing a stored procedure and invoking it directly using the DAD and mod_plsql. For example, /pls/htmldb/owner.procedure?p_file_id=1234
    This link bypasses the Apex show engine so even if I have all the security in the world in Apex using authentication schemes, authorization schemes, etc, a authenticated user in Apex can just right click on the Download link, shoot it off to someone else who can download the file without even logging in to my application!
    How can these "download links" be secured so that only authenticated users can access them only from an Apex session?
    Thanks

    Thank you Vikas.
    The reason I ask is I get a compilation error in my procedure.
    I am no PL/SQL expert so I am sure my syntax or logic is wrong.
    I am using APEX version 2.0
    Error(7,19): PLS-00103: Encountered the symbol "." when expecting one of the following: constant exception <an identifier> <a double-quoted delimited-identifier> table LONG_ double ref char time timestamp interval date binary national character nchar The symbol "<an identifier>" was substituted for "." to continue.
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
            v_mime  VARCHAR2(48);
            v_length  NUMBER;
            v_file_name VARCHAR2(2000);
            Lob_loc  BLOB;
            APEX_APPLICATION.G_FLOW_ID := 100;
    BEGIN
    --testing security
    IF NOT wwv_flow_custom_auth_std.is_session_valid then
        -- display this message or a custom message.
    htp.p('Unauthorized access - file will not be retrieved.');
        -- You can do whatever else you need to here to log the
        --     unauthorized access attempt, get the requestor's
        --     IP address, send email, etc.
        RETURN;
    END IF;
            SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
                    INTO v_mime,lob_loc,v_file_name,v_length
                    FROM file_subjects
                    WHERE id = p_file;
                  -- set up HTTP header
                        -- use an NVL around the mime type and
                        -- if it is a null set it to application/octect
                        -- application/octect may launch a download window from windows
                        owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
                    -- set the size so the browser knows how much to download
                    htp.p('Content-length: ' || v_length);
                    -- the filename will be used by the browser if the users does a save as
                    htp.p('Content-Disposition:  attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
                    -- close the headers           
                    owa_util.http_header_close;
                    -- download the BLOB
                    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    /Thanks
    VC

  • Error when using format mask to create download link in report

    I'm following these directions to create a download link in a report region.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_blob.htm#HTMDB25905
    ######### Table Structure...
    desc document_library
    Name Null Type
    DOC_ID NOT NULL VARCHAR2(40)
    DATE_ADDED NOT NULL DATE
    FILE_CONTENT BLOB()
    FILE_NAME VARCHAR2(100)
    MIME_TYPE VARCHAR2(100)
    DOC_NUMBER NUMBER
    ###### Report Region...
    select a.*, dbms_lob.getlength(file_content) length
    from document_library a
    ###### Download Link Column...
    Date Format: DOWNLOAD:DOCUMENT_LIBRARY:FILE_CONTENT:DOC_NUMBER::MIME_TYPE:FILE_NAME:::attachment:Download
    ####### Results...
    report error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    The report region displays no rows (even though there is one row in the table), no links, and even more strange, it show the value of APP_USER where it would normally display the results.

    Josh,
    Your end result on page 58 and the instructions in that document link don't seem to correlate. Regardless, I:
    1) Copied page 58 to page 158 in your application.
    2) Removed the BLOB format mask from your report link.
    3) Changed your query to:
    select "ROWID",
    "DOC_ID",
    "DATE_ADDED",
    "USER_ID",
    dbms_lob.getlength("FILE_CONTENT") "FILE_CONTENT",
    "FILE_NAME",
    "MIME_TYPE",
    "DOC_NUMBER"
    from "#OWNER#"."DOCUMENT_LIBRARY"
    4) Specified the BLOB format mask for the FILE_CONTENT column.
    Seems to work just fine now (on page 158, that is).
    Joel

  • Referencing report columns in the BLOB download link format mask

    Hi there,
    In a basic report (Apex 4) I have a link to download a BLOB stored in the table. However to save space, instead of using 2 columns, one for the file name and one for the download link, I want to use only one column where the file name is the download link itself.
    To do this, I tried using this download link format mask (ATTACH_FILENAME is the report column that contains the file name):
    DOWNLOAD:ATTACHMENTS:ATTACH_BLOB:ATTACHMENT_ID::ATTACH_MIME_TYPE:ATTACH_FILENAME:::attachment:#ATTACH_FILENAME#
    However it shows #ATTACH_FILENAME# in all rows instead of the actual file name!
    I know that using substitution strings (&) works, so is there a way to also reference report columns in this format mask?
    Thanks
    Luis

    Luis, did you finally resolve this? I have the same question.

  • Download Link as a Column of Report

    Hi All,
    I really tried from my side to somehow implement this requirement but couldn't find a way.
    Requirement: A report with two main columns - One has unique value and the other has a download link. This download link need to be used to fetch a set of data from the database table using the other column's (unique) value. Then, user should get a popup on his screen to download the fetched data in csv format.
    Please give some guidance or pointers to resolve this issue.
    Regards,
    Mangal

    Hi Mangal
    I've done this before actually. You can create a dummy page with a process (on load before header) as a PL/SQL anonymous block. I got code from Denes Kubicek's site which has details of how to generate CSV output using the htp.prn funtion. Then I created the 'download' link in a report column to go to that page passing a value into a hidden field with the unique id of the row.
    The code on the new page looks something like this but I would refer to Denes' work for full information (most of this is copied from him).
    BEGIN
    -- Set the MIME type
    owa_util.mime_header( 'application/octet', FALSE );
    -- Set the name of the file
    htp.p('Content-Disposition: attachment; filename="download.csv"');
    -- Close the HTTP Header
    owa_util.http_header_close;
    htp.prn('Header Name,');
    FOR x IN   (SELECT field1, field2, field3...
                  FROM my_table
                  WHERE my_id = :PX_HIDDEN_ID)
    LOOP
    -- Print out a portion of a row,
    -- separated by commas and ended by a CR
    htp.prn(chr(34)||x.field1   || chr(34) ||','|| chr(34) || x.field2   || chr(34) ||',' ||
             chr(34)||x.field3..... || chr(34) ||chr(13));
    END LOOP;
    -- Send an error code so that the
    -- rest of the HTML does not render
    htmldb_application.g_unrecoverable_error := true;
    END;Hope this helps.
    Cheers
    Ben

  • BLOB content download link on apex report

    Hi Guys,
    I have a simple form where user can attach file and save the records. I iterate through wwv_flow_files and get the file and save it to a custom table which has BLOB column. On another report page i display uploaded file details. What i need is, there must be a column with download link when user clink the link appropriate file should be downloaded. How can i do this ?
    Really appreciate if someone can assist me on this.
    Thanks Guys.

    See About BLOB Support in Forms and Reports.
    There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well. (An earlier version but it is still relevant to APEX 4.x.)
    (Please make an effort to consult the documentation and thoroughly search the forum for previous coverage of a topic. This is a much discussed question.)

  • Download link in Apex4

    Hi All,
    I have migrated Apex 3.2 to Apex 4.
    I had interactive report with download link. It was working fine but in Apex 4 ,this is not working. Could anybody please help me with this?
    Thanx
    Omy

    Hi All,
    Please help as this is urgent.
    I am giving more details:
    My Report Query is:
    SELECT
    issue_id,
    dbms_lob.getlength("P_LOG_FILE") "LOG_FILE",
    progress,
    TO_CHAR(modified_on, 'DD-Mon-YY HH:MI:SS')Mod_date,
    modified_by,
    status,
    time_spent
    FROM
    it_issues_progress
    WHERE
    issue_id =:P38_ISSUE_ID
    UNION ALL
    SELECT
    issue_id,
    null LOG_FILE,
    null progress,
    null Mod_date,
    null modified_by,
    'TOTAL',
    CAST(numtodsinterval(SUM(it_total_seconds_spent(time_spent)), 'SECOND') AS interval DAY(5) TO second(2))
    sum_test
    FROM
    it_issues_progress
    WHERE
    issue_id =:P38_ISSUE_ID
    GROUP BY
    issue_id
    Column format is DOWNLOAD:IT_ISSUES_PROGRESS:P_LOG_FILE:ISSUE_ID::P_MIME_TYPE:P_FILE_NAME:P_LAST_UPDATE::attachment:Download
    Download link was working in Apex3.2 and when I migrated to Apex 4..it stopped working. When I click on link, instead of opening that doc, it dispalyed Page cannot be displayed error.
    Please tell me what should I check?
    Thanx
    Omy

  • Gallery download link possible, like sites published from iPhoto

    Hi all,
    I've got a few photo galleries posted from iWeb. I like the style better than posting pictures from iPhoto as you can do so much more with text, both in adding descriptive text to pages as well as captions on the photos themselves. The one thing I do miss, however, is the ability to allow people to download the whole gallery from one simple download link. I like the way iPhoto does it when posting it's galleries, as the .zip file is generated when the user actually clicks on the "download album" link. Does anyone know whether this is possible in iWeb? I understand that one could upload a zip file to one's own iDisk and then link to it from the page, but I find Apple's implementation in iPhoto much more appealing.
    Thanks for any suggestions.
    Bogie

    You mean "upload"?
    There are many, many ways to access your files in iPhoto:   You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.  If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running:
    For users of 10.6 and later:  You can download a free Services component from MacOSXAutomation  which will give you access to the iPhoto Library from your Services Menu.
    Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5 Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    Show File:  a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.    3.b.
    b: On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected.

  • How to put Download Links on a Jsp Page?

    Hi,
    I am a student and I am working as an intern. This is my question:
    My boss wants me to put some download links(pdf and flash files) on to a jsp page. when a user clicks on the link, all the user info (i.e. name, filename, download time etc) should be stored in a database and then a pop up should appear asking user where you want to download the file.
    I have done most of the part but there is a problem. when a user "left click" on the link then it opens the PDF file in the browser. but if the user "right click and select save target as" then it brings up the box. My boss dont need the user to VIEW the file by left clicking it. I mean on both clicks a pop-up box should appear.
    one more thing to note is that, the PDF are not on the same server. I mean they do not have the same context path.
    Here is what I am doing:
    on the link page:
    sample
    on the other page (which stores information):
    // ... this is downloadfile.jsp
    response.setContentType("application/force-download");               
    String filename = request.getParameter("file");          
    String path = "http://www.domain.com/pdf/" + filename;
    bean.addDownloadDetails(session.getAttribute("email").toString(), filename, request.getRemoteAddr());  // save info in database
    response.sendRedirect(path);
    // ...any ideas or help is appreciated.
    Thanks.

    Straight to the question in the topic title: just use <a> links. But you already found that out. In the future please invent clear topic title covering the actual problem :)
    I have done most of the part but there is a problem. when a user "left click" on the link then it opens the PDF file in the browser. but if the user "right click and select save target as" then it brings up the box. My boss dont need the user to VIEW the file by left clicking it. I mean on both clicks a pop-up box should appear.Change the content disposition to "attachment" instead of "inline".
    one more thing to note is that, the PDF are not on the same server. I mean they do not have the same context path.
    Here is what I am doing:
    // ... this is downloadfile.jsp
    response.setContentType("application/force-download");               
    String filename = request.getParameter("file");          
    String path = "http://www.domain.com/pdf/" + filename;
    bean.addDownloadDetails(session.getAttribute("email").toString(), filename, request.getRemoteAddr());  // save info in database
    response.sendRedirect(path);
    // ...any ideas or help is appreciated.
    Thanks.Better obtain its InputStream by java.net.URLConnection and write it to the OutputStream of the HttpServletResponse. A redirect would create a brand new request, hereby dropping the current request and the response (so setting the content type makes really no sense).
    You can find some pointers in this FileServlet example: [http://balusc.blogspot.com/2007/07/fileservlet.html].

Maybe you are looking for

  • IMovie 6 HD Expanded Text Options Plugin

    I would like to have more flexibility in the use of text in titles in iMovie 6 HD.  I'm looking for a plugin that will allow for more user control of text including multiple fonts, multiple sizes, etc in a single title.  Is there such a plugin availa

  • Can I change the column spacing on just the title page of a 12 page excel spreadsheet?

    Greetings!  I am attempting to make a order form for work and need some help!  The order form is 12 pages long and consists of a title page with a table of contents and the other remaining 11 pages are the items one can purchase.  I am struggling wit

  • Import saved bookmarks from C Drive into Firefox bookmark menu

    I want to import saved bookmarks from a thumb drive into the Firefox bookmark menu

  • LSMW create Vendor Contract ME31k

    Hello Guys, I have create a LSMW using recording to upload a series of contract with multiple lines. I have defined 2 source structure with the respective fields I intent to input values. Header, field 1, field 2 Item, field 1, field 2 I have also ma

  • Web report Goto Opens in a new window

    I have 2 web reports that are linked using the Goto command on the web context menu. This functionality works fine, except I find that the target report opens in a new browser window. Does anyone know how to force the target report to open in the sam