Conserving filename with upload via portal form into blob type

Hi
I have a little question. Is there any chance to conserve a filename, which was uploaded into blob column via portal form and then create link for this file with the same name?
null

Vlasta,
You certanly can save the original filename in your form, to do that you will need to add a FILENAME varchar2 column to your table and write a simple Javascript (search this forum for examples) to copy the fileselect value with onChange event. So, when you submit the form with your file the original name will be stored in you table.
Thanks,
Dmitry

Similar Messages

  • 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>

  • Collaboration  with vendor  via Portal?

    Hi everyone :
       I meet a problem about collaboration with vendor. Our customer has lots of vendor ,and our customer expect that their vendor could query related R/3 report real-time via Portal on Internet .
       I had done the SSO between Portal and R/3, and the user who had Portal user and R/3 both  could access R/3 via Portal easily. We can create user for vendor in Portal easily, but it is impossible that we create user for all of vendors in R/3 , because of R/3 user need to pay for license. So vendors could not query R/3 report via Portal now .
        My problem :
        1. Vendors can't query R/3 report via Portal now.
    Is there anyone met this problem ever , and How to solve this problem ?
        2.On the assumption that our vendor can query R/3 report via Portal now, how can we control the authorization that certain vendor could query his data only, can't query other vendor's data ?
        Any advice and discuss is welcome!
    Best Regards,
    Jianguo Chen
    Message was edited by: jianguo chen
    Message was edited by: jianguo chen

    Hi Brian
    which datasource u r using?
    i think u used read only LDAP + Databse
    when u chang the password for user in portal than after corresponding user password in LDAP directory are not changed thas't why it's generated a message that
    password expires and u can't change the password
    so try to change the password in LDAP also.
    hope it's helps u.
    regards,
    kaushal

  • Crawl ifs using ultrasearch with results via portal

    I would like to be able to crawl ifs and have results via portal.
    The only thing I can find concerning making ultrasearch crawl ifs is this, http://otn.oracle.com/products/ultrasearch/htdocs/FAQ.html, which has the statement "you can crawl Oracle Files with Ultra Search through HTTP - it is just another web data source - or database crawling. However, only public documents can be crawled through HTTP."
    So, I set up a web datasource using the url to ifs login page.
    Does not work. Does anyone know how to do this? Is there a document I am missing?
    Thanks for any ideas.

    You are correct. This is what I found out:
    "Crawling of iFS is not supported in ultrasearch 9.0.2. It is a new feature of 9.0.4"
    HOWEVER:
    "ultrasearch 9.0.4 only runs with iAS 9.0.4 so you would have to upgrade both. According to my records these products have not been released yet and are due sometime later in the year."

  • Error with passwords via Portal and LDAP

    When we change a user's password via portal, either by the user or administrator, the password gets changed, but then when the user tries to log in again, it says the password is expired, and no longer allows changing the password.
    The log has the following errors
    defaultTrace.18.trc:#1.5#0003BA68FF7E00510000000C00001AEC0004059FD46D2697#1132083928701#com.sap.security.core.persistence#sap.com/com.sap.security.core.admin#com.sap.security.core.persistence.[cf=com.sap.security.core.persistence.datasource.imp.LDAPPersistence][md=changePassword][cl=19566]#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_0##0#0#Error##Java###Can not change password
    defaultTrace.18.trc:#1.5#0003BA68FF7E00510000000E00001AEC0004059FD46D2C5B#1132083928706#com.sap.security.core.persistence#sap.com/com.sap.security.core.admin#com.sap.security.core.persistence#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_0##0#0#Error#1#/System/Security/Usermanagement#Java###DataSource : Can not change password#1#CORP_LDAP#
    defaultTrace.18.trc:#1.5#0003BA68FF7E00510000000F00001AEC0004059FD46D96C1#1132083928731#com.sap.security.core.admin#sap.com/com.sap.security.core.admin#com.sap.security.core.admin.[cf=com.sap.security.core.admin.UserAdminLogic][md=performUserProfileChange][cl=19566]#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_0##0#0#Error##Java###[LDAP: error code 16 - No Such Attribute]
    defaultTrace.18.trc:#1.5#0003BA68FF7E003E0000002500001AEC0004059FD5A452F0#1132083949095#com.sap.security.core.persistence#sap.com/com.sap.security.core.admin#com.sap.security.core.persistence.[cf=com.sap.security.core.persistence.datasource.imp.LDAPPersistence][md=changePassword][cl=19566]#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_21##0#0#Error##Java###Can not change password
    defaultTrace.18.trc:#1.5#0003BA68FF7E003E0000002700001AEC0004059FD5A4591E#1132083949099#com.sap.security.core.persistence#sap.com/com.sap.security.core.admin#com.sap.security.core.persistence#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_21##0#0#Error#1#/System/Security/Usermanagement#Java###DataSource : Can not change password#1#CORP_LDAP#
    defaultTrace.18.trc:#1.5#0003BA68FF7E003E0000002800001AEC0004059FD5A49EBD#1132083949114#com.sap.security.core.admin#sap.com/com.sap.security.core.admin#com.sap.security.core.admin.[cf=com.sap.security.core.admin.UserAdminLogic][md=performUserProfileChange][cl=19566]#<USER>#569##<Portal Instance>#<USER>#48329170561011daada40003ba68ff7e#SAPEngine_Application_Thread[impl:3]_21##0#0#Error##Java###[LDAP: error code 16 - No Such Attribute]
    Any help would be greatly appreciated
    We are using Portal 6Sp14
    Thanks
    Brian Timothy

    Hi Brian
    which datasource u r using?
    i think u used read only LDAP + Databse
    when u chang the password for user in portal than after corresponding user password in LDAP directory are not changed thas't why it's generated a message that
    password expires and u can't change the password
    so try to change the password in LDAP also.
    hope it's helps u.
    regards,
    kaushal

  • Scanning an Image via a form into a database

    I was wondering if anyone might have any ideas on how a form could be implemented that interfaces with a scanner to aquire an image and then store that image in a database
    Thanks
    Jonathan Smith

    its possible in Forms 5 and above with ActiveX control, the WangImage.Ocx can be used to scan the image and store the image into your ORACLE 7.x/8.X database.
    all the properties,methods of Registred ActiveX available in procedures & packages, to get these procedures in forms use OLE Importer option and choose the required OCX.
    with this u can easily program and control the Scanner.
    for more info. & Demo form contact me at,
    [email protected]

  • How secure are the documents that are uploaded via the form?

    I am looking to create a form for RFP use and have added a section that allows them to upload documents.  How is this information encrypted or secured?

    Hello,
    apparently, you are concerned that no one can execute a successful right-click, or is that a misunderstanding?
    If not, should we really do that? Thereover you will find a wonderful philosophical discussion at http://webhome.idirect.com/~bowers/copy/copy1.htm
    And by the way there is the misconception that we can protect our graphics, or, or ... With little effort interested people can get to their destination.
    Hans-Günter

  • How to Upload a PDF file into BLOB column in a table using Forms 9i

    Can anyone tell me how to upload a PDF file from client system using File dialog window and store its content in BLOB column in a table. The file to be uploaded will be in client side.

    Hi,
    please, search a bit on the forum before do a question:
    Just searching by "upload blob pdf" ...
    How to batch upload PDF files into database BLOB
    Regards,
    Jose.

  • How to Upload a PDF file into BLOB column in a table using Forms 6i

    Can anyone tell me how to upload a PDF file from client and store its content in BLOB column in a table. The file will be genered using reports and win be stored in db.The file to be uploaded will be in client side.
    Thank´s.

    If you are using version 9 or 10 use webutil.... Look in webutil.pll.
    Use either one these two fuctions...
    FUNCTION Client_To_DB( clientFile       in VARCHAR2,
                             tableName        in VARCHAR2,
                             columnName       in VARCHAR2,
                             whereClause      in VARCHAR2,
                             asynchronous     in BOOLEAN default FALSE,
                             callbackTrigger  in VARCHAR2 default NULL) return BOOLEAN;
      FUNCTION Client_To_DB_With_Progress
                         (   clientFile       in VARCHAR2,
                             tableName        in VARCHAR2,
                             columnName       in VARCHAR2,
                             whereClause      in VARCHAR2,
                             progressTitle    in VARCHAR2,
                             progressSubTitle in VARCHAR2,
                             asynchronous     in BOOLEAN default FALSE,
                             callbackTrigger  in VARCHAR2 default NULL) return BOOLEAN;

  • Help with uploading files through form

    Hey,
    I have a website for a sign business and I'm trying to make
    it so people can upload custom artwork. I am using an ASP Formmail
    script from I think it's www.brainjar.com. If I understood
    correctly from the directions, I can't upload files through that
    script and I tried it once and it did not work. If anyone has any
    ideas then please help. Thanks
    Jeremy

    For security reasons many shared hosts don't permit file
    uploads.
    Try this in the interim
    http://www.yousendit.com/
    --Nancy
    "dayencom" <[email protected]> wrote in
    message
    news:epo2ql$dsb$[email protected]..
    > I just tried contacting my hosting provider:
    www.ixwebhosting.com and the
    guy
    > was not helpful at all. He said that their hosting does
    not support
    uploading
    > files. So I am drawing a blank now. Is there any way to
    use maybe another
    site
    > to upload?
    >

  • 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...

  • Upload and download files from ADF into blob type colum

    i have a question about Kuba's example ( http://kuba.zilp.pl/?id=1# )
    after you have upload the word documents, and when u click on the downoad button that document is open... i want to know if it is possibile that afer you have download the document, you make some changes on it and then to save these changes on the database? any idea if this can be done? Thanks in advance :)

    If you download the entire application from that link, the create.sql file is included in the \DBModel\model\zilp\testcase\dbmodel folder
    It's a rather complicated matter in my opinion. Download the app, open it in JDev and use debug-mode to go through it step by step, so you can try to understand everything that happens.
    Good luck :)

  • Best way to upload form into WDA

    I am working on WDA containing Adobe Interactive form with Vendor Payment request.
    WDA will be called by workflow every time an approver has to approve the request.
    The form will reside at URL.
    What is the best way to upload an Adobe form into WDA?
    I found Web Dynpro example WDR_TEST_ADOBE_PDF_ONLY.
    This example demonstrates how to get a form data assuming the form object is created in the view.
    Is there a way to also upload a template into WDA?
    Or I have to have the form template in SAP repository and
    then assign the form name to  templateSource property in WDA?
    WDR_TEST_ADOBE_PDF_ONLY:
    method wddoinit.
      data:
        mime_repository type ref to if_mr_api,
        content type xstring,
        url type string value '/SAP/BC/WebDynpro/SAP/WDR_TEST_ADOBE_PDF_ONLY/test.pdf'.
      mime_repository = cl_mime_repository_api=>get_api( ).
      call method mime_repository->get
        exporting
          i_url = url
        importing
          e_content = content.
      wd_context->set_attribute( name = 'PDF' value = content ).
    endmethod.
    Thank you,
    Tatyana

    Hi Thomas,
    As you said if we are using Native/ZCI based forms these many stepts are not required as mentioned in the blog:
    Uploading SAP Interactive Form on the ABAP WebDynpro View
    any how i have followed this blog but i got struck at this point
    *Get the RESERVED Data Node and value.
    DATA: KUNNR   TYPE STRING,
          VKORG   TYPE STRING,
          VTWEG   TYPE STRING,
          SPART    TYPE STRING,
          MATERIAL TYPE STRING,
          TARGET_QTY TYPE STRING,
          DELIVERY TYPE CHAR10.
    NODE = DOCUMENT->FIND_FROM_NAME( NAME = 'KUNNR' ).
    KUNNR = NODE->GET_VALUE( ).
    NODE = DOCUMENT->FIND_FROM_NAME( NAME = 'VKORG' ).
    VKORG = NODE->GET_VALUE( ).
    i am not getting any value into 'NODE' object.
    can you please help me is there any other simple way to read the offline interactive form and automatically bind to to pdf_source attribute of interactive form.
    So that what ever the user upload it will be mapped in online form.
    i am working on ECC 6.0 with SP13, i hope i need not to apply this note : OSS Note 1055738.
    Thanks,
    Mahesh.Gattu

  • Downloading into blobs with name of source files

    Hi
    I have a little question. Is there any chance to conserve a name of the file, which was uploaded into blob column via portal form and then create link for this file with the same name?

    Vlasta,
    This question should go to the Portal Applications Forum (I assume you're using a custom form, and not uploading files to content areas).
    Thanks,
    Jerry
    null

  • How to make Portal Form Submit go back to portal page?

    I'm using a form inside a Dynamic Page portlet so that I can have portal page parameters feed into the form. This works just fine.
    However, when I submit a new record in my form, the page navigates to a page with just my Portal Form and not the Portal Page with the dynamic page that referenced the form. I need to make sure that when users click the insert/submit on my form that it goes back to the Portal Page that houses the Dynamic Page portlet.
    I have logged a TAR but Oracle was unable to resolve it since they can't write code for a customer. Their suggestion was to put this in the pl/sql "Custom" event for the insert button:
    DECLARE
    l_url VARCHAR2(200);
    begin
    l_url:=
    'TARGET=_blank>http://dallas.lacare.org:7777/portal/page?_pageid=154,107011&_dad=portal&_schema=PORTAL';
    PORTAL.wwa_app_module.set_target(l_url,'CALL');
    exception
    WHEN OTHERS then
    htp.p(SQLERRM);
    end;
    But that gives me an internal server error when I submit my form.
    Any other ideas?
    Thanks,
    David

    Looks like my problem was just the TARGET=_blank> stuff. I change the code to the following:
    DECLARE
    l_url VARCHAR2(200);
    begin
    l_url:=
    '/portal/page?_pageid=154,107011&_dad=portal&_schema=PORTAL';
    PORTAL.wwa_app_module.set_target(l_url,'CALL');
    exception
    WHEN OTHERS then
    htp.p(SQLERRM);
    end;
    That works fine and instead of putting it in place of the INSERT button code I left that alone and put it in the "After form processing" pl/sql code. Now it works pretty well. The only thing left to fix is that it loses all my current Page Parameter values when forwarding the url like that.
    David

Maybe you are looking for

  • Open On PlayBook Error

    Hello All, We're having issues with the 'Open On Playbook' not working with email attachments. If we try to open anything (a 293kb JPEG in this case) we receive the following error: Attachment exceeds the maximum download size of 0.0 KB. The image op

  • Windows 7: No two finger scrolling

    Fresh install of Windows 7 on a boot camp partition.  Installed the drivers off of a snow leopard cd. Right click works, two finger scrolling doesn't. In device manager, the "Apple Trackpad" driver is dated 3/09. Any ideas?

  • Adding a behavior to an image with a mask?? How can you...

    I want to apply the spin behavior to an image of a globe. Here is the tricky part. It has a mask on it that fades the bottom right side of the globe. How can I apply the behavior to the image but NOT the mask. I want the Mask to stay in place and the

  • Session shows up on itunes but not on nike +

    hi all, as the title suggests. Ive had a nike + account on the website for a while, today I started using my ipod etc and plugged the ipod back in to sync it. The run shows on my iTunes nike + tab, but not on the website....? any thoughts please? tha

  • How do I get pics from all apps gallery etc?

    How do I upload from my gallery etc?