Unable to upload multiple files

In MOSS, I am unable to upload multiple files from the Site Actions | Manage Content and Structure | New | Item menu. I have tried adding Word documents and image files (JPEG, GIFS) to no avail into the \images or \document folders. Even if I try just one file, three or five, the menu never initiates or progresses. It just sits. If I cancel, the menu returns immediately. I have tried to change security settings with no success. Trying to upload multiple files on different MOSS installations also fails. If this is related to a Web Dev settings, can you tell me exactly where the setting is? Thanks for your insight. cm

Believe it or not, I have found a solution after about 4hrs of fiddling around. This appears to be a bug in Sharepoint 2007. There is a work around that I have discovered! Follow the steps below and let me know if this works for you. It has worked for me and other people so far.
The steps are as follows:
1) Browse to your website at http://<servername>/_layouts/settings.aspx; you will need to login by providing a service account name & password or your site collection administrator account & password.
2) Once you login, click on 'Site Actions' menu.
3) Then, click on 'Manage Site Content and Structure'.
4) Click on any document library you want to upload or add files into. If you do not see the 'Upload' menu from the dropdown main menu between the 'New' and 'Actions' menu then you have this bug as well showing up on your server. Don't give up yet, there is a solution. Keep going through these steps!
5) Click on 'New' and select 'Item'.
6) You should now see the Upload Document page; under the input browse field there should be a link for 'Upload Multiple Files...', if you do not see this you will need to install either Office 2003 or Office 2007. If you do see it, click on it.
7) Now, you should see the multiple upload page that allows you to select multiple files. If you try to select one or several and click on the OK button, nothing will happen. No need to worry! There is a work around. Just keep reading to the next step.
8) On the hierarchy navigation you will have links something like this:
WebSiteName > Folder1 > Folder2
9) Click on the "Document Library" folder name; in our case it was Folder1. Basically its the folder you ended up in in step #4.
10) Now, did you notice anyting in your menu change? Now you should be able to see the Upload menu option between the 'New' and 'Actions' menu that you could not see in step #4.
11) Click on the 'Upload' menu and select 'Upload Multiple Documents'
12) Now, you will be back at the Upload document page where you were in step #7
13) Select one file or many and then click OK. Now it works!!! You should get an IE popup asking you that your about to upload files to your site, Click OK.
VOILA!!!
Don't ask me why, I do not know why this happens but it works.

Similar Messages

  • Unable to upload multiple files on FTP server.

    m trying to upload files present in one directory..
    its storing the first file properly...but from second file its giving error.
    my code is pasted below:
    ftp1.setFileType(FTPClient.BINARY_FILE_TYPE);
    ftp2.setFileType(FTPClient.BINARY_FILE_TYPE);
                 String filename="";
                FTPFile[] files = ftp1.listFiles();
                if ( files.length == 0 )
                    System.out.println("  No results.");
                } else
                     for (int i = 0; i < files.length; i++)
                          FTPFile f = files;
              filename = f.getName();      
              System.out.println(" > " + filename );
              ftp2.enterRemotePassiveMode();
         ftp1.enterRemoteActiveMode(InetAddress.getByName(ftp2.getPassiveHost()),
              if (ftp1.remoteRetrieve(filename) && ftp2.remoteStore(filename))
                   System.out.println("Successfull >" + filename);
              else
                   System.err.println(
                   "Couldn't initiate transfer. Check that filenames are valid.");
                   break __main;
         }//end of for
         ftp1.completePendingCommand();
         ftp2.completePendingCommand();
    }// end of else
    my code is actually trying to list files from FTP Server1 and copy this to FTP Server2.
    I think the problem is
    ftp2.enterRemotePassiveMode();
         ftp1.enterRemoteActiveMode(InetAddress.getByName(ftp2.getPassiveHost()),
    please can any one figure out the problem...
    any help suggestion is welcome....

    What about connecting to the remote server with cfftp. Then
    using
    cfdirectory to get a listing of the files. Loop over the
    listing using cfftp
    to grab each file.
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "Dusty Carr" <[email protected]> wrote in message
    news:f59tue$731$[email protected]..
    >I need to get files from a remote server using cfftp, the
    problem is that
    > the files are not zipped into one file, there are
    multiple files with
    > different file names that change daily, all are .jpg
    extensions. I
    > thought
    > I could just use something like this:
    > <cfftp action = "getFile"
    > stopOnError = "Yes"
    > remotefile = "/*.jpg"
    > localfile = " my dir"
    > connection = "ftp_IDX"
    > failIfExists = "false"
    > passive="yes">
    >
    > But just using the * wildcard does not work. what am I
    missing here?
    >
    >

  • Upload multiple files WITH correct pairs of form fields into Database

    In my form page, I would like to allow 3 files upload and 3 corresponding text fields, so that the filename and text description can be saved in database table in correct pair. Like this:
    INSERT INTO table1 (filename,desc) VALUES('photo1.jpg','happy day');
    INSERT INTO table1 (filename,desc) VALUES('photo2.jpg','fire camp');
    INSERT INTO table1 (filename,desc) VALUES('photo3.jpg','christmas night');
    However, using the commons fileupload, http://commons.apache.org/fileupload/, I don't know how to reconstruct my codes so that I can acheieve this result.
    if(item.isFormField()){
    }else{
    }I seems to be restricted from this structure.
    The jsp form page
    <input type="text" name="description1" value="" />
    <input type="file" name="sourcefile" value="" />
    <input type="text" name="description2" value="" />
    <input type="file" name="sourcefile" value="" />The Servlet file
    package Upload;
    import sql.*;
    import user.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Date;
    import java.util.List;
    import java.util.Iterator;
    import java.io.File;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    public class UploadFile extends HttpServlet {
    private String fs;
    private String category = null;
    private String realpath = null;
    public String imagepath = null;
    public PrintWriter out;
    private Map<String, String> formfield = new HashMap<String, String>();
      //Initialize global variables
      public void init(ServletConfig config, ServletContext context) throws ServletException {
        super.init(config);
      //Process the HTTP Post request
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        Thumbnail thumb = new Thumbnail();
        fs = System.getProperty("file.separator");
        this.SetImagePath();
         boolean isMultipart = ServletFileUpload.isMultipartContent(request);
         if(!isMultipart){
          out.print("not multiple part.");
         }else{
             FileItemFactory factory = new DiskFileItemFactory();
             ServletFileUpload upload = new ServletFileUpload(factory);
             List items = null;
             try{
                items = upload.parseRequest(request);
             } catch (FileUploadException e) {
                e.printStackTrace();
             Iterator itr = items.iterator();
             while (itr.hasNext()) {
               FileItem item = (FileItem) itr.next();
               if(item.isFormField()){
                  String formvalue = new String(item.getString().getBytes("ISO-8859-1"), "utf-8");
                  formfield.put(item.getFieldName(),formvalue);
                  out.println("Normal Form Field, ParaName:" + item.getFieldName() + ", ParaValue: " + formvalue + "<br/>");
               }else{
                 String itemName = item.getName();
                 String filename = GetTodayDate() + "-" + itemName;
                 try{
                   new File(this.imagepath + formfield.get("category")).mkdirs();
                   new File(this.imagepath + formfield.get("category")+fs+"thumbnails").mkdirs();
                   //Save the file to the destination path
                   File savedFile = new File(this.imagepath + formfield.get("category") + fs + filename);
                   item.write(savedFile);
                   thumb.Process(this.imagepath + formfield.get("category") +fs+ filename,this.imagepath + formfield.get("category") +fs+ "thumbnails" +fs+ filename, 25, 100);
                   DBConnection db = new DBConnection();
                   String sql = "SELECT id from category where name = '"+formfield.get("category")+"'";
                   db.SelectQuery(sql);
                    while(db.rs.next()){
                      int cat_id = db.rs.getInt("id");
                      sql = "INSERT INTO file (cat_id,filename,description) VALUES ("+cat_id+",'"+filename+"','"+formfield.get("description")+"')";
                      out.println(sql);
                      db.RunQuery(sql);
                 } catch (Exception e){
                    e.printStackTrace();
            HttpSession session = request.getSession();
            UserData k = (UserData)session.getAttribute("userdata");
            k.setMessage("File Upload successfully");
            response.sendRedirect("./Upload.jsp");
      //Get today date, it is a test, actually the current date can be retrieved from SQL
      public String GetTodayDate(){
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        String today = format.format(new Date());
        return today;
      //Set the current RealPath which the file calls for this file
      public void SetRealPath(){
        this.realpath = getServletConfig().getServletContext().getRealPath("/");
      public void SetImagePath(){
        this.SetRealPath();
        this.imagepath = this.realpath + "images" +fs;
    }Can anyone give me some code suggestion? Thx.

    When one hits the submit button - I then get a 404 page error.What is the apaches(?) error log saying? Mostly you get very useful information when looking into the error log!
    In any case you may look at how you are Uploading Multiple Files with mod_plsql.

  • How can I upload multiple files in a master detail relationship?

    I would like to be able to upload several files for one record (a one to many relationship). I tried using a master detail form, but the tabular form does not support file browse. I've searched the forum and found several examples asking how to upload multiple files at once. That is not what I'm trying to do. I simply want the user to browse, select a file, provide a file name and description. Then select the next file. When they are done selecting files (it may be one file or many files) I want them to hit the submit button and I'll run a procedure that saves the files to the database.
    How can I do this? Thanks, you guys are the best. Elizabeth

    Elizabeth,
    I had this situation come up once and here's what I did, thought it may not be exactly what you're looking for.
    I created a collection to store the ID's of the files that had been uploaded, along with the key and other information. The file browse input will upload your files into the wwv_flow_files table on submit. I was storing the documents in another application table.
    The after submit process grabs the id from wwv_flow_files where the name is = to your file input.
    After you add that ID and your associated master key in the collection, your final submit process fetches the files from wwv_flow_files and inserts them into your own table.
    I can put an example on apex.oracle.com if that would be helpful.
    Thanks,
    Jeff

  • How do you upload multiple files?

    Hi,
    This is propably an easy one.
    I am trying to upload multiple .gif files to a folder in KM.
    I went to Content Management -> KM Content and created a new folder inside a sub-folder.
    Now when I click on the contect menu I select New.. and then Upload...
    However, this only allows me to select for upload one file at a time.
    I neeed to upload about 50 files. It will take ages doing this one by one!
    Is there a quicker way?

    Hi
    Multiple upload of files is possible by using WEBDAV protocol.To use this follow the below steps.
    Go to folder to which u want to upload the files and the click on the context menu and select details.A new window will open up.In that select settings->properties->accesslinks.copy the WEBDAV link shown there.
    Now
    click My Network Places on your desktop, and choose Tools from the top menu bar/Map Network Drive from the context menu. If you donu2019t find My Network Places on your desktop you can find it under Windows Start menu option on your computer.
    select Sign up for online storage or connect to a network server. Click next
    Highlight Choose another network locations. Click next
    Use Cntrl+V to paste the URL path name(webdav URL).  Click next
    Change the URL location to the name of the folder in KM. Hit next.  Hit finish
    A folder by the name you just created will appear under my network places on your explorer application.
    Using this u can upload multiple files directly into folder u want.
    Hope this solves ur problem.
    Regards
    Hussain.

  • How to upload multiple files into a server location at a single time

    Hi All,
    In my application i need to send multiple files from a particular page into the server location. In this page there will be an option to upload a file and after selecting the file , we will have an option asking if we were interested to send another file. It works just similar to google mail where we can multiple files at the same time. Right now though i had coded the uploading files concept i am facing some problems when trying to upload multiple files. All the files are being appended to a single file but i want them to be placed as different files at the specified location. Plz help me in this regard...
    Thanks in advance................,,

    Hi,
    i am sending the code in my prg. Have a look at it.
    var multi_selector = new MultiSelector( document.getElementById( 'files_list' ),3);
    In the above line i am specyfying that the maximum no. of files to be uploaded is 3. So if i upload less than 3 files, the program doesn't work and is not reading the uploaded files. If i upload 3 files it works fine. So please suggest me how to make this work irrespective of the no. of files uploaded using apache commons.
    My code is as follows:
    <form action="./servlet/Sample" method = "post" enctype="multipart/form-data">
         <!-- The file element -- NOTE: it has an ID -->
         <input id="my_file_element" type="file" name="file_1" >
         <input type="submit" name="submit1" value="submit">
    </form>
    Files:
    <!-- This is where the output will appear -->
    <div id="files_list"></div>
    <script>
         <!-- Create an instance of the multiSelector class, pass it the output target and the max number of files -->
         var multi_selector = new MultiSelector( document.getElementById( 'files_list' ),3);
         <!-- Pass in the file element -->
         multi_selector.addElement( document.getElementById( 'my_file_element' ) );
    </script>

  • Getting error while uploading multiple files in sharepoint hosted app in 2013 with REST API

    Hi All,
    In one of my tasks, I was struck with one issue, that is "While uploading multiple files into custom list with REST API".
    Iam trying to upload multiple files in library with REST calls for an APP development, my issue is if i wants to upload 4 image at once its storing only
    3 image file and further giving "Conflict" error". Below is the attached screenshot of exact error.
    Error within screenshot are : status Code : 409
    status Text :conflict
    For this operation i am uploading different files as an attachment to an list item, below is the code used for uploading multiple files.
    my code is
    function PerformUpload(listName, fileName, listItem, fileData)
        var urlOfAttachment="";
       // var itemId = listItem.get_id();
        urlOfAttachment = appWebUrl + "/_api/web/lists/GetByTitle('" + listName + "')/items(" + listItem + ")/AttachmentFiles/add(FileName='" + fileName + "')"
        // use the request executor (cross domain library) to perform the upload
        var reqExecutor = new SP.RequestExecutor(appWebUrl);
        reqExecutor.executeAsync({
            url: urlOfAttachment,
            method: "POST",
            headers: {
                "Accept": "application/json; odata=verbose",
                "X-RequestDigest": digest              
            contentType: "application/json;odata=verbose",
            binaryStringRequestBody: true,
            body: fileData,
            success: function (x, y, z) {
                alert("Success!");
            error: function (x, y, z) {
                alert(z);

    Hi,
    THis is common issue if your file size exceeds 
     upload a document of size more than 1mb. worksss well for kb files.
    https://social.technet.microsoft.com/Forums/office/en-US/b888ac78-eb4e-4653-b69d-1917c84cc777/getting-error-while-uploading-multiple-files-in-sharepoint-hosted-app-in-2013-with-rest-api?forum=sharepointdevelopment
    or try the below method
    https://social.technet.microsoft.com/Forums/office/en-US/40b0cb04-1fbb-4639-96f3-a95fe3bdbd78/upload-files-using-rest-api-in-sharepoint-2013?forum=sharepointdevelopment
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Uploading Multiple files in One-Click!!!

    Hi All,
    I have got nearly about 900 PDF files in my file server which need to be uploaded to the KM CONTENT Repository.
    what is the best methodology to upload all these file in to the repository in <u><b>one click.</b></u>
    Is it possible to achieve this??
    Eagerly waiting for replies.
    Regards,
    Kavitha

    Hi Patric,
    It is quite interesting to see that there is a way to upload multiple files in a click.
    I just followed your way. i copied the WebDAV URL and pasted and executed in a new browser. and i get....
    <i>The folder you are looking for has no displayable content.
    You can try one of the following:
    Access the folder using the Navigation user interface.
    Access the folder as a Web folder. Your operating system and browser dictate whether or not this will work.</i> "
    When i choose "Web Folder", i get a pop up and it says "<i>The web folder address Internet Explorer was given was too long. Please use a shorter address</i>."
    When i choose "Navigation User Interface", iam taken to the default KM Folder.
    I nowhere able to see the folder structure like what you have mentioned in your reply.
    Kindly help me out.
    Regards,
    Kavitha

  • I am unable to upload video files

    Hi
    i am unable to upload video files to ipod.
    can anybody explain the procedure how to upload?
    Thanks

    GUIDES TO: Converting Video for iPod - Mac & Window
    http://forums.ilounge.com/showthread.php?s=&threadid=123067
    Patrick

  • How to upload multiple files using af:inputfile

    Hi,
    I am using J dev 11.1.1.3. I have a requirement wherein i need to upload multiple files using af:inputfile. Can we do in it ADF ? Is there any other work around to implement the same. I have checked previous questions but not able to find proper solution for this.
    Any pointer in this regard is highly helpful.
    Regards,
    Kalyan

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files using wicket

    Hai,
    how to upload multiple files using wicket at a single browse.
    any suggestion?
    Thanks in advance

    You have to do this your self by either (as vinod said) using a different component (not present in adf) or implementing this:
    1) allow the user to select multiple filenames (somehow)
    2) zip them together
    3) upload the zip
    4) unpack the zip on the server
    5) work with the files
    Timo

  • How to upload multiple files in Webdynpro using File upload Screen Element

    Hi Experts,
          Can anybody tell me how to upload multiple files/pdfs in webdynpro using file upload screen element, and also please tell me what is the maximum storage limit of RAWSTRING data type,Advance Thanks.
    Regards,
    Sandesh

    Hi Sandesh,
    this is simply not supported, not in WebDynpro nor in standard HTML.
    A workaround is to upload a ZIP with all files and on server side unpack the ZIP and operate on the single files.
    I hope it will  help u..
    ----------------------OR-------------------------
    As you know using File upload UI element we can upload only one file at a time. There may be a scenario where user may want to upload any no of files at a time which is not determined at design time. This can be acheived using the ACF UpDownload UI element which requires a security whiltelist to be created
    http://scn.sap.com/docs/DOC-2270
    ----------------------OR-------------------------
    You can use Table UI element.
    Regards,
    Deepak Singh

  • Unable to read multiple files in BODS

    hi all,
    i am unable to read multiple files [with same format of fields] using wild card characters in file name.
    scenario:
    i have 2 files: test1.xlsx & test2.xlsx
    in the excel file format, for the file name column, i have given test*.xlsx.
    and done the direct mapping to target column.
    but when i run the job i am getting below error.
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.ReadAllRows(MSExcelAdapterReadTable.java:1242)
    at com.acta.adapter.msexceladapter.MSExcelAdapterReadTable.readNext(MSExcelAdapterReadTable.java:1285)
    at com.acta.adapter.sdk.StreamListener.handleBrokerMessage(StreamListener.java:151)
    at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:448)
    at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)
    at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1600)
    at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)
    please let me know if there is any solution to this.
    regards,
    Swetha

    Hi,
    i just copied a xlsx file with 3 different names (Test_Data.xlsx, Test_1.xlsx, Test_2.xlsx) and tried with below options and it worked for me.
    Note: I tried on the same OS and DS 4.1 SP2(14.1.2.378)versions. In Linux File names are case sensitive.

  • SystemManager.as : 'should never get here' when uploading multiple files

    I have a code for uploading multiple files. The code works so that when complete event from the first upload is received, the second upload is started. The code works fine on Flash Player 9, but now when I changed my compiler settings to require version 10, the program no longer works.
    Also this only seems to occur when I execute the code from the Flash Builder. I have compiled the code with ant requiring FP version 10. This swf is bundled inside a war and can executed without any problems. I actually set the ant compiler to require FP 10 some time ago already.
    I get error 2174, which is for trying to upload multiple files at the same time. Although, I don't understand why I get this, since the uploads should not be done simultaneously as I explained above.
    The interesting thing here is when I try to debug it. At some point when stepping in the code, I get the following error thrown. It's thrown by the code pasted at the end. Interesting is the else block that throws the error, the comment says 'should never get here'.
    A bug in the framework or in Flex Builder?
    Using IE 8 with FP 10.0.32.18 (on Win XP if that matters).
    Thanks.
    Error
         at mx.managers::SystemManager/updateLastActiveForm()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:5087]
         at mx.managers::SystemManager/activateForm()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2352]
         at mx.managers::SystemManager/activate()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2307]
         at mx.managers::FocusManager/creationCompleteHandler()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\FocusManager.as:1592]
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
         at mx.core::UIComponent/set initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
         at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
         at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]
         private function updateLastActiveForm():void
              // find "form" in the forms array and move that entry to
              // the end of the array.
              var n:int = forms.length;
              if (n < 2)
                 return;     // zero or one forms, no need to update
              var index:int = -1;
              for (var i:int = 0; i < n; i++)
                 if (areFormsEqual(form, forms[i]))
                      index = i;
                      break;
              if (index >= 0)
                 forms.splice(index, 1);
                 forms.push(form);
              else
                 throw new Error();     // should never get here

    Thanks for the reply Alex.
    In both cases the URL is http. The only difference is that in one case everything is on server inside a war running on Tomcat to which I make connection via browser. In the other case the server side stuff is running on local computer on Tomcat and the Flex code is not bundled inside the war.
    In both cases the URL is in form of http://... When running locally, the URL is http://localhost:8080/myAppName. I don't know how the network card driver translates this URL, but what you said might have something to do with it.

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

Maybe you are looking for

  • Fade to black at end of movie

    In Garageband, there is a little triangle in the timeline that represents the end of the song. When you render (mix) the song out to a file, it will do it till it gets to that triangle. Am I correct in saying that I need to add a gap at the end of ev

  • Oracle 10g - query is very slow in jdbc but not in other tools

    I'm using PreparedStatement to execute a query with some parameters. in sql developer, it just spends 12 seconds but in jdbc, it's around 140 seconds. I disabled "_optim_peek_user_binds" parameter already but it didn't help. alter session set "_optim

  • Volatile Keyword

    I am confused with the keyword "volatile". Few questions. I have seen two different descriptions for this keyword. 1) Processors store data in their own registers for more efficient use.In Multiprocessor environments, the "volatile" keyword will ensu

  • Fuzzy query search

    is there a function that will allow a fuzzy or regular expression type search? I need to find about 20k records in an address table based on the address description. for example I was given the following address to look for: 2941 N. Commerce Pkwy. Bu

  • Plug-ins & Software

    New iMac user here and not sure if I'm posting in the correct area. I've downloaded and installed Flip4Mac and am wondering if I need VLC also for viewing video files? If so, do they work well together? Thanks, Doug in AK