7 Replies Latest reply on Aug 30, 2013 10:50 AM by Timo Hahn

    Uploading multiple files programmatically




      I am building an application in ADF using Jdev

      Here i have a <af:inputFile> which uploads a .csv file. In this .csv file i have a column containing some filepaths, below is the snapshot from my .csv file


      Full File Path
      C:/Documents and Settings/user/My Documents/*****/Upload/Test.pdf
      C:/Documents and Settings/user/My Documents/*****/Upload/Check.pdf


      Now i am reading this .csv file and when i get the "fullFilePath" value , i read the file mentioned in the path using the below code:

            File uploadedFile;

            uploadedFile = new File(fullFilePath);


            if (uploadedFile != null)


                pdffilename = uploadedFile.getPath().substring(uploadedFile.getPath().lastIndexOf("\\") + 1);

                pdfcontentType = new MimetypesFileTypeMap().getContentType(uploadedFile);

                pdfsize = uploadedFile.length();

                String extn = pdffilename.substring(pdffilename.lastIndexOf(".") + 1);


                        FileInputStream fis = new FileInputStream(uploadedFile);

                        BlobDomain blob = parseISToBlob(fis,pdfsize);


      I am doing this as i have to read all the files from the filepaths mentioned in the .csv file and upload them into a blob data directly while Uploading the csv file itself.

      This piece of code is running perfectly fine when i test this on the local IntegratedWeblogicServer. But when i deploy it to a StandAlone Server it seems the code is not able to read the file,mentioned in the .csv row, from the client machine path ("C:/Documents and Settings/user/My Documents/*****/Upload/Test.pdf").


      Could you please suggest me some ways to do this?