JClient Binary File Upload and Insert

We are looking for ways to upload and insert a pdf or other binary file into a view object using JClient on the client tier. Can anyone point us to sample code for this?

this should do this
ApplicationModule appmod = panelBinding.getApplicationModule();
JUApplication app = panelBinding.getApplication();
ViewObject vo_calldoc = appmod.findViewObject("CallDocsView1");
Row newdoc = vo_calldoc.createRow();
newdoc.setAttribute("CdcCalId", PanelCallView3.vo_call.getRowSet().getCurrentRow().getAttribute("CalId"));
newdoc.setAttribute("CdcFilenaam",file.getName());
newdoc.setAttribute("CdcBlob",blob);
vo_calldoc.insertRow(newdoc);
appmod.getTransaction().postChanges();
Object[] inskey = new Object[]{ newdoc.getAttribute("CdcId")};
appmod.getTransaction().commit();
Key pkkey = new Key(inskey);
Row[] rowarray = vo_calldoc.findByKey(pkkey,1);
Row updrow = rowarray[0];
System.out.println(updrow.getAttribute("CdcFilenaam"));
updrow.lock();
oracle.jbo.domain.BlobDomain myblob = (oracle.jbo.domain.BlobDomain)updrow.getAttribute("CdcBlob");
int next;
FileInputStream fileIn = new FileInputStream(file);
OutputStream blobOut = myblob.getBinaryOutputStream();
while ((next = fileIn.read()) != -1)
blobOut.write(next);
fileIn.close();
blobOut.close();
app.commitTransaction();

Similar Messages

  • File upload and download through web Dynpro2.0.9.

    Hai All,
          File upload and download through web Dynpro "IWDResource" package is used.But in web Dynpro 2.0.9. this package is not possible.How to uplolad and download  files through web Dynpro2.0.9.
          Anyone can help me?
    Thanks in Advance,
    Kindly Regards,
    K.Saravanan.

    Hi Saravanan,
    You can go through these links,
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/63/9c0e41a346ef6fe10000000a1550b0/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/63/9c0e41a346ef6fe10000000a1550b0/frameset.htm</a>
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/5a/90ff4cd0c8cd48a69b836e5e550880/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/5a/90ff4cd0c8cd48a69b836e5e550880/frameset.htm</a>
    So, apart from putting FileUpload UI on your view, you have to implement a method which will do the actual uplod for you.
    Hope this helps.
    Regards,
    Mausam

  • How to solve Fusion ADF file upload and download?

    Now we are building web application with Fusion ADF (JDeveloper 11.1.2.0.0). We want to downloading and uploading from tables.Is there any special tool in Fusion ADF or should I going with traditional java coding. Thanks

    Actually ADF Provide Components for file upload and download
    Download :
    <af:fileDownloadActionListener/>
    See tagDoc: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_fileDownloadActionListener.html
    Upload
    <af:inputFile/>
    See tagDoc: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_inputFile.html
    Edited by: -CHS on Jul 6, 2011 9:52 AM

  • Using CSA to filter MSN Messenger file upload and download

    How would i go about filtering out the file upload and download functionality in messenger ?
    I've already disallowed the possibility of uploading or saving from Messenger by not allowing the program the read or write files. But when a PC without this policy on it uploads to a CSA protected host. The CSA will download the entire file but then refuse to save the file.
    I'd rather disallow this functionality alltogether ? my guess are that i would hae to do some COM filtering ?
    I'd be greatfull for any hints you might have.
    Best Regards,
    Lasse

    The document Blocking Peer-to-Peer File Sharing Programs with the PIX Firewall has more information on blocking file sharing applications.
    http://www.cisco.com/en/US/tech/tk583/tk372/technologies_tech_note09186a00801e419a.shtml

  • Please help me on file upload and download

    Dear all..
    i am new in this i try to apply the tutorial for file upload and download but it is old i work on net weaver 7.1 and many proery has change and i cant applyb this tutorial...

    Thanks. If you can provide some more details about where - some application, or a web page - are you trying to upload or download a file we can discover to documentation you need. Also, it will be of help if you tell what is the name of the outdated guide you mentioned.
    Best regards,
    Rossen

  • The file upload and download

    Hi all,
    I am going to build a form and run on the web. I am going to do a form which intend to do the file upload and download (any type of file). How can I achieve it?
    Also, once I put it on the web, I would like to do a 'web-like' function: when the user click on the file name, it can open it with the association with the browser (For instance, when I click on the *.doc file, it opens the word automatically). Is it poosible to do so and how to do so? Thanks first.
    Patrick

    Go to Utilities>more Utilities>upload/download is there.
    Amresh.

  • Tracking file upload and download details

    Hi All,
    We are using TMG in our place,all users/servers are used to connect the internet with TMG server..
    is there a way to track the information of file upload and download details in TMG.. 
    KJSUBBU

    Hi,
    Please check the blog below. I haven't try it.
    Live monitor for TMG server
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee
    the accuracy of this third-party contact information.
    Best Regards,
    Joyce
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • File upload and download through web Dynpro2.0.9. with Java

    Hai All,
          I am working in web Dynpro2.0.9 with Java.For file upload and download "IWDResource" is used.But this package is not available in web Dynpro2.0.9.How to download and upload files through using this version?
          Anyone can help me?
    Thanks in Advance,
    Kindly Regards,
    S.V.Selva Bala.

    Hai Noufal,
        I successfully upload the files to the database.
        For file download i create two views.
       In the first view files are fetched from the database(datatype for the file is image in the database)and it is converted to byte from image.Afterthat the byte is converted to string by using the following code.
    byte source[]=new byte[1024];
                        if(rs.next()){
                             source=rs.getBytes("cv_document_file");
                        String sourcestr=source.toString();
                        wdContext.currentContextElement().setDownloadfile(sourcestr);     
            Now i put the converted string into the second view.In the second view i try to convert the string value into bytes by using the following codes.
    String sourcestr=wdContext.currentContextElement().getDownloadfile();
             byte bs[]=new byte[1024];
             bs=sourcestr.getBytes();
             wdContext.currentDownloadElement().setDownloadfile(bs);
             But it doesn't work and no error.
             Now i am expecting the valuable suggestions from you.
    Thanks in Advance,
    Kind Regards,
    S.V.Selva Bala.

  • Where are the buttons gone File upload and Download in New ABAP Editor

    Where are the buttons gone of File upload and Download in New ABAP Editor in ECC 6.0.
    Or some new utility added for this feature.
    Kindly guide.
    Thanks,
    pradeep

    Go to Utilities>more Utilities>upload/download is there.
    Amresh.

  • File Upload and Download in Oracle iAS PL/SQL Gateway

    i'm using the example 113471.1 to "File Upload and Download in
    Oracle iAS PL/SQL Gateway"
    when i press the submit button after i select a file to upload
    i get the next message in the browser "No se puede mostrar la
    pagina" HTTP 404 file not found.
    I think the problem is in ctnsample.upload_form in the line
    htp.formOpen(curl => 'cntsample.upload', cmethod => 'POST',
    cenctype => 'multipart/form-data');
    The ctnsample.remove work fine.
    Could you,help me...

    There is a document in the Oracle 9iAS 1.0.2.2 Library titled "Using the PL-SQL Gateway" Part Number A90099-01.pdf that explains file upload and download through modplsql. In particular there is a section there titled "Direct BLOB Download" which explains how one can easily download a blob utilising the wpg_docload package.
    I am still concerned that there exist duplicate copies of my blob content. One copy in the wwdoc_document$ table, and one in my custom table.
    Dmitry/Oracle can you confirm this?

  • File Upload and Download with XSQL Utility

    Dear all,
    I'm working on a Web-based application to communicate with users.
    This application is based on the XSQL-Utility (XSU).
    Currently I cannot find any possibility to pass an arbitrary
    binary file from the client side to store it in a LOB column
    inside the Oracle RDBMS and vice versa.
    All examples I can find refers to store/read XML-content in CLOB
    columns.
    Thank you for any help.
    Stephan

    Hai Noufal,
        I successfully upload the files to the database.
        For file download i create two views.
       In the first view files are fetched from the database(datatype for the file is image in the database)and it is converted to byte from image.Afterthat the byte is converted to string by using the following code.
    byte source[]=new byte[1024];
                        if(rs.next()){
                             source=rs.getBytes("cv_document_file");
                        String sourcestr=source.toString();
                        wdContext.currentContextElement().setDownloadfile(sourcestr);     
            Now i put the converted string into the second view.In the second view i try to convert the string value into bytes by using the following codes.
    String sourcestr=wdContext.currentContextElement().getDownloadfile();
             byte bs[]=new byte[1024];
             bs=sourcestr.getBytes();
             wdContext.currentDownloadElement().setDownloadfile(bs);
             But it doesn't work and no error.
             Now i am expecting the valuable suggestions from you.
    Thanks in Advance,
    Kind Regards,
    S.V.Selva Bala.

  • File Upload and Reading from Ex cel

    Hi ALL,
    In my jsp page I have the file form field (input type=file) by which i browse for a excel file in local system and when i select the file and clicks on the submit button.
    The excel file should be uploaded to server and at the same time the contents of the excel file should be read and inserted into the database.
    Can any one help me in this regard
    My html looks like this
    <tr>
    <td>Select File</td>
    <td><input type="file" name="file">
    </td>
    </tr>
    <tr>
    <td colspan="2"><div align="center">
    <input type="submit" name="Submit" value="Submit">
    </div></td>
    </tr>
    Thanks in advance
    Ravi

    you actually have several problems here.... the first is getting the file to the servlet/jsp. look into the IFleUpload component from apache. http://jakarta.apache.org they have an File uploading system that works really well. After that, you have to "understand" the spreadsheet. If the user(s) have sent it up as a CSV or some other type of simple file, cool, otherwise you are going to have to either write or find a library to parse and interpret excel's file format. I realize I only gave a hint of answer to the first part of your question, but it should at least point you in the write direction.
    Ona side note - do they HAVE to upload an excel file? is there any way you can convince them to first save the excel file as a CSV or better, a tab delimited file? this would make your parsing job trivial. :)

  • Struts commons binary file upload issue

    Hi,
    I was wondering if someone could help me with uploading binary files using jakarta commons file upload. I've looked at several examples and forums and it seems to work but sometimes the binary files that I upload get corrupted. I have no idea why this might be happening. Here is a snippet of my code.
        UploadFileForm uploadFileForm = (UploadFileForm)form;
        FormFile file = uploadFileForm.getFile();
        String dirName = "/tmp/";
        InputStream inputStream = null;
        OutputStream bos = null;
        inputStream = file.getInputStream();
        bos = new FileOutputStream(dirName + file.getFileName());
        int bytesRead = 0;
        byte[] buffer = new byte[4096];
        while ((bytesRead = inputStream.read(buffer, 0, 4096)) != -1) {
            bos.write(buffer, 0, bytesRead);
        }            Am I doing something wrong?
    Thanks.
    PV

    FormFile myFile    = myForm.getTheFile();
        byte[] fileData    = myFile.getFileData();
        BufferedReader in = null;
       try{
           in = new BufferedReader(new InputStreamReader(new   ByteArrayInputStream(fileData)));
           // in = new BufferedReader(new  InputStreamReader(myFile.getInputStream()));
           String str;
            while ((str = in.readLine()) != null) {
                    System.out.println(str);
       }catch(Exception exp){
           exp.printStackTrace();
        }finally{
             if(in != null){
                try{
                   in.close();
                }catch(Exception ep){
                       ep.printStackTrace();
        } Hope this might help :)
    and a small advice please do reactivate archived posts.It'd be lot better if you start with a new one.
    Hope there are no hard and fast issues on this.
    REGARDS,
    RaHuL

  • Flat file(Binary file) upload using GUI_UPLOAD

    I had uploaded a Binary file Using GUI_UPLOAD , File type was 'BIN'.
    but the data i got in Internal Table was in 0's and 1's.
    whereas i tried the same thing on a different server but  the same Version it gave me the data as text in Internal Table.
    what could be reason..or wat could be done to resolve this.

    Did you declare the internal table used to upload the binary file as TYPE X ?
    begin of itab,
      raw(255) type x,
    end of itab occurs 0.
    CALL FUNCTION 'GUI_UPLOAD'
       exporting
          filetype =  'BIN'
          filename = 'C:DOWNLOAD.BIN'
       tables
          data_tab = itab.
    Always remember to reward snippets you find useful!

  • When trying to download it says binary file download and it starts but doesnt finish

    as i try to download the little box pops up and says binary file save or cancel . So i save and it starts downloading the little line starts across and it gets to the end and disappears and leaves a empty box and nothing else happens

    Which player? Do you mean Flash, or maybe the Windows Media Player plugin?
    * http://www.adobe.com/products/flashplayer/distribution3.html
    * https://support.mozilla.org/en-US/kb/play-windows-media-files-in-firefox
    You have to run the installers with Firefox closed.

Maybe you are looking for

  • How to Get the min,max and original values in a single query

    Hi, I have a task where in i have to the min , max and the original values of  a data set . I have the data like below and i want the target as well as mentioned below SOURCE DATASOURCE INTEGRATIONID SLOT_DATE SLOT1 SLOT2 SLOT3 SLOT4 SLOT5 SLOT6 SLOT

  • OpenGL not working with Photoshop CS4 on MacPro + ATI X1900XT

    Hi, i am running a MacPro 2x2 2.66 Ghz with 12GB Ram, an ATI X1900 XT 512MB and a GeForce 7300GT. The ATI is in Slot 1. Connected to the ATI card is an Apple CD 30", connected to the GeForce is an Apple CD 23" and a Sanyo TV-LCD. *The problem:* when

  • PROBLEM WHIT IDVD 08!!!!!!!!!! HELP ME PLEASE

    I can't running idvd 08, when i clik on idvd icon, idvd open and close immediatly what is the problem ???

  • Cost Center wise List of Material Consumption

    Dear Sir, Kindly guide us , as which Tcode or Report is available to see the Material wise Consumption List  during a period for a given Cost-Center . Full marks are assured for the suggested solution Regards B Mittal

  • View and Navigate through PDF´s on a DB2 SQL Query

    Hello, We need to create a windows forms application in .Net to view and navigate through pdf´s that are located on a DB2 Express SQL database using the Acrobat SDK or PDF Library. The idea would be to query the SQL table and the result we should be