Upload and download from database

i need to do a form to upload data in a blob field in the database and then have a link or smth simliar to download them..... any link or example wich can help me plss??? thanks in advance

Hi Shay! i am not finding nothing about upload and download in a blob field in database ... in the link you sent me ... can you be more specific pls? thanks :=)

Similar Messages

  • Reg :File upload and download from client machine

    hi..
    anyone help me the way that how to upload and download word
    document file from client machine.. i am using j2eeserver1.4 in linux..
    i want upload file from client machine(windows) to server(linux.) please
    help me . tell me idea regarding..
    i have tried this coding.. but i can transfer txt file. only. when i upload mirosoft word file.. it will open with some ascii values with actual content.
    <!-- upload.jsp -->
    <%@ page import="java.io.*" %>
    <%String contentType = request.getContentType();
    String file = "";
    String saveFile = "";
    FileOutputStream fileOut = null;
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
    DataInputStream in = new DataInputStream(request.getInputStream());
    int formDataLength = request.getContentLength();
    byte dataBytes[] = new byte[formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while (totalBytesRead < formDataLength)
    byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    try { 
    file = new String(dataBytes);
    saveFile = file.substring(file.indexOf("filename=\"") + 10);
    saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("/") + 1,saveFile.indexOf("\""));
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex + 1,contentType.length());
    int pos;
    pos = file.indexOf("filename=/" + 1);
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    pos = file.indexOf("\n", pos) + 1;
    int boundaryLocation = file.indexOf(boundary, pos) - 4;
    int startPos = ((file.substring(0, pos)).getBytes()).length;
    int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
    String folder = "/tmp/uploads/";
    fileOut = new FileOutputStream(folder + saveFile);
    fileOut.write(dataBytes);
    fileOut.write(dataBytes, startPos, (endPos - startPos));
    fileOut.flush(); } catch(Exception e) {  out.print(e);
    } finally
    {  try
    {fileOut.close();
    }catch(Exception err)
    %>
    please which package will help me to upload word document file with no errror. send me how can use in ftp.. send me some sample program..
    Regards..
    New User M.Senthil..

    Hi,
    Well,i don't know whether if this helps people here are not.
    It is always a good practise to do it via Servlet and then download content.
    The adavantage of doing this is
    1). You may not need to pack the downloadable with the .war which you ultimately genrate which ceratinly help us in terms of faster deployment.
    3). You may update the new content just by moving a file to the backup folder.
    2).One may definately download the content irrespective to the content/file.
    Hope example below helps..
    Configurations:
    In the above example we are assuming that we placing all downlodable file in D:/webapp/downlodables/ and you have configured the same path as a init param with the name "filePath" in your web.xml.
    something like the one below.
    <servlet>
        <servlet-name>DownloadServlet</servlet-name>
        <servlet-class>com.DownloadServlet</servlet-class>
        <init-param>
           <param-name>filePath</param-name>
           <param-value>D:/webapp/downlodables/</param-name>
           <!--Could use any backup folder Available on your Server-->
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>DownloadServlet</servlet-name>
        <url-pattern>/downloadFile</url-pattern>
    </servlet-mapping>DownloadServlet.java:
    ==================
    package com;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import javax.activation.MimetypesFileTypeMap;
    *@Author RaHuL
    /**Download Servlet
    *  which could be accessed downloadFile?fid=fileName
    *  or
    *  http://HOST_NAME:APPLN_PORT/ApplnContext/downloadFile?fid=fileName
    public class DownloadServlet extends HttpServlet{
      private static String filePath = new String();
      private static boolean dirExists = false;
      public void init(ServletConfig config){
          // Acquiring Backup Folder Part
          filePath = config.getInitParameter("filePath");
          dirExists = new File(filePath).exists();      
      private void processAction(HttpServletRequest request,HttpServletResponse response) throws Exception{
           // Some Authentication Checks depending upon requirements.
           // getting fileName which user is requesting for
           String fileName = request.getParameter("fid");
           //Building the filePath
           StringBuffer  tFile = new StringBuffer();
           tFile.append(filePath);    
           tFile.append("fileName"); 
           boolean exists = new File(tFile.toString()).exists();
           // Checking whether the file Exists or not      
           if(exists){
            FileInputStream input = null;
            BufferedOutputStream output = null; 
            int contentLength = 0;
            try{
                // Getting the Mime-Type
                String contentType = new MimetypesFileTypeMap().getContentType(tFile.toString());          
                input = new FileInputStream(tFile.toString());
                contentLength = input.available();
                response.setContentType(contentType);
                response.setContentLength(contentLength);
                response.setHeader("Content-Disposition","attachment;filename="+fileName);
                output = new BufferedOutputStream(response.getOutputStream());
                while ( contentLength-- > 0 ) {
                   output.write(input.read());
                 output.flush();
              }catch(IOException e) {
                     System.err.println("Exception Occured:"+e.getMessage());
                 System.err.println("Exception Localized Message:"+e.getLocalizedMessage());
              } finally {
                   if (output != null) {
                       try {
                          output.close();
                      } catch (IOException ie) {
                          System.err.println("Exception Occured:"+e.getMessage());
                             System.err.println("Exception Localized Message:"+e.getLocalizedMessage());                      
           }else{
             response.sendRedirect("/errorPage.html");
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws Exception{       
            processAction(request,response); 
      public void doGet(HttpServletRequest request,HttpServletResponse response) throws Exception{
            processAction(request,response); 
    NOTE: Make sure You include activations.jar in your CLASSPATH b4 trying the code.
    therefore,if you have something like above set as your application enviroment in the above disccussed
    can be done by just giving a simple hyper link like
    <a href="downloadFile?fid=fileName.qxd" target="_blank">Download File</a>REGARDS,
    RaHuL

  • Image upload and display from database blob coloumn in ADF

    HI
    how can i upload and display image from database ( blob ) coloumn in ADF

    Hi,
    Take a look to this video: http://www.youtube.com/watch?v=_KYquJwYFGE
    AP

  • File Upload and Download From Presentation server

    I have a requirement to provide a selection option to user to upload a big file from presentation server.
    Not sure whther we can a upload the entire file at one short from presentation server. PLease provide some sample code to upload a huge file from presentation server and downlaod a file to presentation server.

    Hi,
    Try this code for download----
    TABLES:
      kna1.                                " General Data in Customer Master
    TYPES:
      BEGIN OF type_s_kna1,
        kunnr TYPE kna1-kunnr,             " Customer Number
        adrnr TYPE kna1-adrnr,             " Address
        anred TYPE kna1-anred,             " Title
        erdat TYPE kna1-erdat,             " Date on which record created
        ernam TYPE kna1-ernam,             " Name of Person who Created the
                                           " Object
    END OF type_s_kna1.
    DATA:
      fs_kna1 TYPE type_s_kna1.
    DATA:
        t_kna1 LIKE
      STANDARD TABLE
            OF fs_kna1.
    " Select-options----
    SELECT-OPTIONS:
      s_kunnr FOR kna1-kunnr.              " Customer Number
    AT SELECTION-SCREEN ON s_kunnr.
      SELECT kunnr                         " Customer number
        FROM kna1
        INTO s_kunnr UP TO 1 ROWS.
      ENDSELECT.
      IF sy-subrc NE 0.
        MESSAGE 'No such customer exists' TYPE 'S'.
      ENDIF.                               " IF SY-SUBRC NE 0
    START-OF-SELECTION.
      PERFORM customer_selection.
    FORM customer_selection .
      SELECT kunnr                         " Customer Number
             adrnr                         " Address
             anred                         " Title
             erdat                         " Date of record creation
             ernam                         " Person who created object
        FROM kna1
        INTO TABLE t_kna1
       WHERE kunnr IN s_kunnr.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
        BIN_FILESIZE                  =
          filename                      = 'C:\TEMP\CUSTOMER.TXT'
        FILETYPE                      = 'ASC'
         write_field_separator         = 'X'
        HEADER                        = '00'
        WRITE_LF                      = 'X'
         col_select                    = 'X'
         col_select_mask               = 'XXXXX'
        IGNORE_CERR                   = ABAP_TRUE
        REPLACEMENT                   = '#'
      IMPORTING
        FILELENGTH                    =
        TABLES
          data_tab                      = t_kna1
       EXCEPTIONS
               dataprovider_exception        = 20
         control_flush_error           = 21
         OTHERS                        = 22
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.                               " IF SY-SUBRC NE 0
    ENDFORM.                               " FORM CUSTOMER_SELECTION.
    for upload----
    " Table declarations----
    TABLES:
      bkpf.                                " Accounting Document Header
    TYPES:
      BEGIN OF type_s_bkpf,
        bukrs TYPE bkpf-bukrs,             " Company code
        belnr TYPE bkpf-belnr,             " Accounting Document Number
        gjahr TYPE bkpf-gjahr,             " Fiscal Year
        blart TYPE bkpf-blart,             " Document type
        bldat TYPE bkpf-bldat,             " Document Date in Document
      END OF type_s_bkpf.
    DATA:
      fs_bkpf TYPE type_s_bkpf.
    DATA:
      fname(10) TYPE c VALUE 'ACCOUNTING'  .
    DATA:
        t_bkpf LIKE
      STANDARD TABLE
            OF fs_bkpf.
    *" Select-options----
    SELECT-OPTIONS:
      s_bukrs FOR bkpf-bukrs,              " Company code
      s_gjahr FOR bkpf-gjahr.              " Fiscal year
    OPEN DATASET fname FOR OUTPUT IN BINARY MODE .
    PERFORM account_selection.
    LOOP AT t_bkpf INTO fs_bkpf.
      TRANSFER fs_bkpf TO fname.
    ENDLOOP.                               " LOOP T_BKPF
    CLOSE DATASET fname.
    FORM account_selection .
      SELECT bukrs                         " Company code
             belnr                         " Accounting document number
             gjahr                         " Fiscal year
             blart                         " Document year
             bldat                         " Document date
        FROM bkpf
        INTO TABLE t_bkpf
       WHERE bukrs IN s_bukrs
         AND gjahr IN s_gjahr.
    ENDFORM.                               " FORM ACCOUNT_SELECTION
    also try
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = 'C:\TEMP\CUSTOMER.TXT'
      FILETYPE                      = 'ASC'
       has_field_separator           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        data_tab                      = t_kna1
    EXCEPTIONS
          disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17
    IF sy-subrc EQ 0.
      PERFORM customer_display.
    ELSE.
      MESSAGE 'No customer file exists'(006) TYPE 'S'.
    ENDIF.                                 " IF SU-SUBRC EQ 0
    Regards,
    jaya
    Edited by: Jayapradha Neeli on May 28, 2009 11:38 AM

  • File Upload and download from a central repositiory.

    Hi experts,
      I  have written the following code in webdynpro for abap...But it is giving error as "Access Via Null Object Not possible"
    This code runs perfectly fine in abap. I dont know what is the problem in webdynpro .
    Code :
       data: ifile1 type RCGFILETR-FTAPPL,
          ifile3 type RCGFILETR-FTAPPL,
          ifile2 type ESEFTAPPL value 'd:\usr\sap\D11\DVEBMGS00\work\TEST1\',   "test5.ppt'.
          filenam type string,
          filenam1 type string,
          filenam2 type string.
    ifile1 = lv_file_name.
    filenam = ifile1.
    ifile3 = ifile1.
    while ifile1 CS '\'.
    split  ifile1 at '\' into filenam1 filenam2.
    ifile1 = filenam2.
    endwhile.
    Concatenate ifile2 filenam2 into ifile2.
    CALL FUNCTION 'C13Z_FILE_UPLOAD_BINARY'
      EXPORTING
        i_file_front_end         = ifile3
        i_file_appl              = ifile2
        I_FILE_OVERWRITE         = 'X'        "ESP1_FALSE
    IMPORTING
      E_FLG_OPEN_ERROR         =
      E_OS_MESSAGE             =
      EXCEPTIONS
        FE_FILE_NOT_EXISTS       = 1
        FE_FILE_READ_ERROR       = 2
        AP_NO_AUTHORITY          = 3
        AP_FILE_OPEN_ERROR       = 4
        AP_FILE_EXISTS           = 5
        OTHERS                   = 6
    IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Pls help me...
    Thanx,
    Pratibha

    Hi Pratibha,
    I don't think you are getting the error due to the code which you have written here. You must have written some code that is causing the error. Put a breakpoint in your code and debug your code.
    Regards
    Arjun

  • Use WEBUTIL for upload and download file to/from Database

    Dear friends
    I have a table with three columns (id , name , myDoc) myDoc is a BLOB, I would like upload word documents or PDFs or images to myDoc column, I use Oracle Form 10g, I try to use webutil to solve my problem, but I couldn't, Please help me.
    Thanks

    # Details
    # transfer.database.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the database server.
    # transfer.appsrv.enabled : Can be TRUE or FALSE - allows you to disable
    # upload and download from the application
    # server.
    # transfer.appsrv.workAreaRoot: The root of the location in which WebUtil can
    # store temporary files uploaded from the client.
    # If no location is specified, Application Server
    # user_home/temp will be assumed.
    # This location is always readable and writable
    # no matter what the settings in
    # transfer.appsrv.* are. This setting is
    # required if you need the Client side
    # READ/WRITE_IMAGE_FILE procedures.
    # transfer.appsrv.accessControl:Can be TRUE or FALSE - allows you to indicate
    # that uploads and downloads can only occur from
    # the directories named in the
    # transfer.appsrv.read.n and
    # transfer.appsrv.write.n entries and their
    # subdirectories. If this setting is FALSE,
    # transfers can happen anywhere.
    # transfer.appsrv.read.<n>: List of directory names that downloads can read
    # from.
    # transfer.appsrv.write.<n>: List of directory names that uploads can write
    # to.
    #NOTE: By default the file transfer is disabled as a security measure
    transfer.database.enabled=true
    transfer.appsrv.enabled=true
    transfer.appsrv.workAreaRoot=
    transfer.appsrv.accessControl=TRUE
    #List transfer.appsrv.read.<n> directories
    transfer.appsrv.read.1=c:\temp
    #List transfer.appsrv.write.<n> directories
    transfer.appsrv.write.1=c:\temp

  • How to view the report of Upload and Download list

    Hello,
    I would like to see the Portal Activity Report of all the users who have logged in and out and their times and I would like to see the names also with how many uploades and downloades from the portal.
    I can view only the user ids thats all in the Portal Activity Report.
    Can anyone help me. Please
    cheers
    murali

    Hi Murali,
    KM access is not logged by the portal activity report so far.
    You would have to implement it on your own. For an introduction see Documents hits count (KM Activity Reporting)
    Hope it helps
    Detlev

  • Uploading and downloading files from a web app (Urgent!!)

    Hi everyone:
    I'm developing an application in PL/SQL to upload and download files from an HTML webpage. I congured the document table and the parameters necessary in the DAD of my application.
    when I upload the file using my webpage that file info is automatically uploaded to the doc table. This is as far as I have gotten.
    I need to do the following:
    - Place the uploaded file into a column in another table in my database as part of a text message (think of it as an email message), and delete the file from the doc table (as this is thought to be a temp table that holds the file when uploaded from my webpage)
    - Retreive the file so that it can be downloaded from another web page.
    The file can be a PDF, WORD DOC, etc...
    I now that I can do this with InterMedia but I haven't figured out how :(
    Can anyone please point me to an example or some documentation that can guide me through the process.
    DB VERSION: 8.1.7
    IAS VERSION: 1.0.2.2
    Thanks,
    Carlos Abarca

    The idea was for you to look at the code and get an idea of how to access the BLOB in the document table. IF you look at the procedure
    insert_new_photo( new_description IN VARCHAR2,
    new_location IN VARCHAR,
    new_photo IN VARCHAR2 )
    It shows how to access the blob that is stored in the document table. You can then copy this blob to your own table using the DBMS_LOB package.
    Hope this helps,
    Larry

  • About "Upload and download files from ADF into blob type colum."

    hi
    Using JDeveloper 10.1.3.3.0 I have tried the example available for download from this blog post by Jakub Pawlowski:
    "Upload and download files from ADF into blob type colum."
    at http://kuba.zilp.pl/?id=1
    First a thank you to Jakub for this interesting example.
    I have a question about a PDF file that I uploaded using the example.
    The file has a size of 10445518 bytes.
    After I upload that file, the blob column has a value with a size of 10445516 bytes, 2 bytes less.
    SQL> select file_name, dbms_lob.getlength(stored_file) from blob_table;
    FILE_NAME
    DBMS_LOB.GETLENGTH(STORED_FILE)
    ADF-DeveloperGuide-4GL-B25947_01.pdf
                           10445516If I download that file using the example, it has the same size as the blob value, 10445516 bytes.
    If I open the downloaded file, using Adobe Reader 8.1.1, it first shows this message:
    "The file is damaged but is being repaired."
    After that, there is not problem using the PDF file in Adobe Reader.
    I have tried this with both Internet Explorer 6 and Firefox 2.0.0.11.
    I have also tried this with other (smaller) files, and those upload and download correctly.
    question:
    Why are those 2 bytes lost during upload?
    many thanks
    Jan Vervecken

    Hi!
    I can only post you my code that works for me and as I said I had same problems but can't remember what solved them. My code:
      public void fileUploaded(ValueChangeEvent event)
        FacesContext fc = FacesContext.getCurrentInstance();
        UploadedFile file = (UploadedFile) event.getNewValue();
        if (file != null && file.getLength() > 0)
          // here I have some messages written and a call to the method on AM to save the uploaded file to the DB
      private BlobDomain newBlobDomainForInputStream(InputStream in)
        throws SQLException, IOException
        BlobDomain loBlob = new BlobDomain();
        OutputStream out = loBlob.getBinaryOutputStream();
        writeInputStreamToWriter(in, out);
        in.close();
        out.close();
        return loBlob;
      private static void writeInputStreamToWriter(InputStream in,
                                                   OutputStream out)
        throws IOException
        byte[] buffer = new byte[8192];
        int charsRead = 0;
        while ((charsRead = in.read(buffer, 0, 8192)) != -1)
          out.write(buffer, 0, charsRead);
       * Launch the upload - see fileUploaded() for actual upload handling.
       * @return null navigation event - we stay on this page
      public String UploadButton_action()
        if (this.getMyInputFile().getValue() == null)
          FacesContext context = FacesContext.getCurrentInstance();
          FacesMessage message =
            new FacesMessage(FacesMessage.SEVERITY_WARN, JSFUtils.getStringFromBundle("fileupload.emptyfielderror"),
                             null);
          context.addMessage(this.getMyInputFile().getId(), message);
        return null;
       * Setter for inputFile UI Component.
       * @param inputFile inputFile UI component
      public void setMyInputFile(CoreInputFile inputFile)
        this.myInputFile = inputFile;
       * Getter for inputFile UI Component.
       * @return inputFile UI component
      public CoreInputFile getMyInputFile()
        return myInputFile;
      }fileUploaded is a valueChangeListener on inputFile and UploadButton_action is as the name says the action for upload button.
    Hope this helps. If not, than your problem is probably not the same as mine was, although the message about file corrupted was the same.
    Next thing you can check in this case is if your file exceeds max file upload size. I don't know the exact default value, but if the file is too long I think this upload logic will upload only a part of the file and save it to the DB which can also lead to the same file corrupted error.
    You can set the max upload value in web.xml like this:
    <context-param>
    <!-- Maximum memory per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_MEMORY</param-name>
    <!-- Use 5000K -->
    <param-value>5120000</param-value>
    </context-param>
    <context-param>
    <!-- Maximum disk space per request (in bytes) -->
    <param-name>oracle.adf.view.faces.UPLOAD_MAX_DISK_SPACE</param-name>
    <!-- Use 10,000K -->
    <param-value>15360000</param-value>
    </context-param>

  • How to upload and download any file from plsql through weblogic server

    hi all,
    how to upload and download any file from plsql through weblogic server? i am using oracle 10g express edition and jboss.
    Thanks and Regards,
    MSORA

    hi bala ,
    for a windown server u can use VNC (virtual network connection) which opens a session on u r desktop later u can drag and drop form there vice versa and for a linux box you can use Win SCP which helps to open a session with interface to u r desktop in both cases you can upload and down load files very easiy just as we drag and drop items in a simple pc .. we use the same technique...
    bye
    vamshi

  • Upload and download speed is horrible.  it takes hours to download a movie from iTunes.

    upload and download speed is horrible.  it takes hours to download a movie from iTunes.

    VangieChuck the problem is definitely not iTunes it is your ISP download provision. Either your ISP needs to make a service call and solve your bandwidth issues or you need a better service, granted it all depends where in the world you are located. In Kappy's and my neck of the woods we are use to 5 - 250 Mbps download rates with an average of about 25 mbps for most city dewellers. Upload will vary depending on your service.

  • Upload and download the file same name but different extension from the document library.

    HI,
         I am using the Client Object Model (Copy. Asmx ) To upload and download the file from the document library.
    I am having the mandatory File ID for the each Document.
    I tried to upload the the document (KIF53.txt) with File ID (KIF53) uploaded successfully.
    Again I tried to Upload the document(KIF53.docx) With File ID(KIF53) its uploaded the file but it not upload the File ID in the Column
    Please find the below screen shoot for the reference.

    thanks ashish
    tried 
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder IsFolder alredy Exist.
    private string IsFolderExist(string InputFolderName)
            string retStatus
    = false.ToString();
            try
                ClientContext context
    = newClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
    context.Credentials = CredentialCache.DefaultCredentials;
                List list
    = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
                FieldCollection fields
    = list.Fields;
                CamlQuery camlQueryForItem
    = new CamlQuery();
    camlQueryForItem.ViewXml = string.Format(@"<View 
    Scope='RecursiveAll'>
    <Query>
                          <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                            </Eq>
    </Where>
    </Query>
    </View>", @"/sites/test/hcl/"
    + InputFolderName);
    Microsoft.SharePoint.Client.ListItemCollection listItems
    = list.GetItems(camlQueryForItem);
    context.Load(listItems);
    context.ExecuteQuery();
                if (listItems.Count
    > 0)
    retStatus = true.ToString();
                else
    retStatus = false.ToString();
            catch (Exception ex)
    retStatus = "X02";
            return retStatus;
    thanks
    Sundhar 

  • Upload and download files from ADF 11g into blob type colum

    Hi Guys ,
    Anybody help me how to upload and download the *.pdf / *.doc file in blob object in ADF 11G.
    Thanks ,
    Ashwani Yadav

    You should try the JDeveloper and ADF forum. This is the Oracle FORMS forum.
    Craig...

  • Uploading and downloading blobs without wwv_flow_files

    Hi,
    I am currently working on oracle 10g database and application express.
    i went throu the material to upload and download images, pdf from a htmldb book.
    it was excellent material. but the book only gave example about loading and downloading images, pdf through flows_files.wwv_flow_files view.
    it seemed like we can only d/l the pdf, images and display on htmldb report only throu flows_files.wwv_flow_files view, as in the case of the script below
    select
       wff.id, htf.anchor( 'p?n=' || wff.id, wff.filename ) filename_1,
       wff.filename filename_2, ed.abstract abstract
    from
       wwv_flow_files wff, easy_document ed
    where
       wff.name = ed.name;but is there a way to load and download images, pdfs from my own tables without the involvement of flows_files schema.
    if then how can i modify the above code to get the pdf from the following table
    TableA (vessel number, cruise number, pdf blob)
    here for every (vessel, cruise) combination there is a pdf.
    how can i get this pdf displayed in my htmldb report.
    Can someone guide me please.
    Thanks,
    Philip.

    Hi,
    I tried the document link you gave and it looks like, i can directly download pdfs from my own tables without needding to upload to wwv_flow_files_objecst$ table.
    i modified the procedure in the document accroding to my requirements and it worked.
    in my page i show a grid with the parameters and the pdf documentname as download link.
    when i click on the link a popup window with the option to save or open comes up.
    but the popup window shows the filename as my procedure name through which i pass the id for the pdf document instaed of the filename which is shown as download link on the page.
    How can i change this popup window filename to the default file name shown in the download link.
    so that everytime i select the parameters, the page shows the pdf filename as link and on clicking the link the popup window should be able to show the same name shown as link.
    i think this can be set either at the procedure level or at the page level.
    and this is the following contents of the procedure
    --        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('PDF','application/octet'), FALSE );
                    -- set the size so the browser knows how much to download
                     htp.p('Content-length: ' || B_LEN);
                    -- the filename will be used by the browser if the users does a save as
    -- htp.p('Content-Disposition:  attachment; filename="'||'CR'||VES||CRU||'.PDF'|| '"');
                    -- close the headers           
                    owa_util.http_header_close;
                    -- download the BLOB
                    wpg_docload.download_file( BREP );and this is what i did at the page level. for that particular column i went to link option and the foll is what i gave:
    Link Text: CR#VESSEL##CRUISE#.PDF
    Link Attributes: target="_blank"
    URL: #OWNER#.PROC_DOWNLOAD_PDFS?V=#VESSEL#&C=#CRUISE#
    Here the link text is the filename that i wanted to show when saving the file.
    Can someone guid eme please.
    Thanks,
    Philip.

  • How to upload and download in BLOB?

    I tried webutil but is not working properly according to my needs is there any other way to upload and download files in BLOB?
    If any body knows solution please tell me.
    Regards,

    Dear Colleague,
    In my Forms application, I use the WEBUTIL to load files into a BLOB column. However, prior to getting WEBUTIL to work, I loaded files into the BLOB column using the following PL/SQL code.
    Note, that the example assumes that the row already exists in the table and you are updating it by loading the file into the BLOB. You will also be required to first create a Database Directory object (in my case, it was called "RKMS_DOC_DIR")
    I do not have an example for downloading, as I use the WEBUTIL functionality for this.
    Good luck!
    Randy
    PL/SQL (DBMS_LOB Package): Loading an Internal Persistent BLOB
    with BFILE Data
    The following example illustrates:
    How to use LOADBLOBFROMFILE to load the entire file without getting its length first.
    How to use the return value of the offsets to calculate the actual amount loaded.
    DECLARE
    src_loc BFILE := bfilename('RKMS_DOC_DIR','ROPE_Offerte_v2.pdf') ;
    v_author VARCHAR2(10) := 'RKMS_MGR' ;
    dst_loc BLOB;
    src_offset NUMBER := 1;
    dst_offset NUMBER := 1;
    src_osin NUMBER;
    dst_osin NUMBER;
    bytes_rd NUMBER;
    bytes_wt NUMBER;
    BEGIN
    -- SELECT ad_composite INTO dst_loc FROM Print_media
    -- WHERE product_id=3106 and ad_id=13001 FOR UPDATE;
    SELECT doc INTO dst_loc FROM docs
    WHERE USER_AUTHOR_ID = v_author FOR UPDATE;
    /* Opening the source BFILE is mandatory */
    dbms_lob.fileopen(src_loc, dbms_lob.file_readonly);
    /* Opening the LOB is optional */
    dbms_lob.OPEN(dst_loc, dbms_lob.lob_readwrite);
    /* Save the input source/destination offsets */
    src_osin := src_offset;
    dst_osin := dst_offset;
    /* Use LOBMAXSIZE to indicate loading the entire BFILE */
    dbms_lob.LOADBLOBFROMFILE(dst_loc, src_loc, dbms_lob.lobmaxsize, src_offset, dst_offset) ;
    /* Closing the LOB is mandatory if you have opened it */
    dbms_lob.close(dst_loc);
    dbms_lob.filecloseall();
    COMMIT;
    /* Use the src_offset returned to calculate the actual amount read from the BFILE */
    bytes_rd := src_offset - src_osin;
    dbms_output.put_line(' Number of bytes read from the BFILE ' || bytes_rd ) ;
    /* Use the dst_offset returned to calculate the actual amount written to the BLOB */
    bytes_wt := dst_offset - dst_osin;
    dbms_output.put_line(' Number of bytes written to the BLOB ' || bytes_wt ) ;
    /* If there is no exception the number of bytes read should equal to the number of bytes written */
    END ;
    /

Maybe you are looking for

  • PI 7.3 receiver AAE idoc scenario-No receiver comm channel found in ICO

    Hi, I am working in PI 7.3 receiver AAE idoc scenario.When I try to configure Integrated Configuration(ICO),I am not able to see the receiver comm channel in receiver agreement. What is the reason for this??I have configured the communication channel

  • Slideshow consisting of programmed image sequences using a BluRay player?

    I posted this is iPhoto, and the only response suggested I try Keynote. So here goes. My partner has just moved from slides to digital (using my camera). She has often been asked to show her slides, and now that she has digital photos, it's up to me

  • How to transfer documents from pc to mac?

    I was wondering how to transfer documents from Pc windows 7 to mac book air, without internet on the windows pc?

  • Mail will not add passwords

    when i try to add passwords for my account in mail preferences they won't stay--i am always prompted to give password each time--when i go back into mail preferences the passwords are not saved, even though i have checked to save them

  • African Scam Using Skype

    Hi everyone, This post is about my encounter of an African Scamer. That is what it is called. I am not implying in any way that the Scam themselves were African in nature, race, color, or any other profiling. I want to warn my fellow Skype users abou