File Upload issues

There is a file upload that I have and I am getting an
error...
Notice: Undefined variable: file_list in
C:\vhosts\mysite\upload\index.php on line 20
On line 20 in my php page happens to be the following code
that is giving an error...$file_list .= "<option value=\"$file\"
>$file</option>";
<?php
#for windows...
$dirname = $_SERVER['DOCUMENT_ROOT'].'/_assets/professor/';
//$dirname = "C:\\wamp\\www";
#(for Linux... $dirname = "user/local/apache/bin";)
$dir = opendir($dirname);
while(false != ($file = readdir($dir))){
if(($file != ".") and ($file != "..")){
$file_list .= "<option value=\"$file\"
>$file</option>";
closedir($dir);
?>
This is what is in the body...
<form enctype="multipart/form-data" action="uploaded.php"
method="POST">
<fieldset><legend>Upload Professor
Image</legend>
<!-- MAX_FILE_SIZE must precede the file input field
-->
<!--input type="hidden" name="MAX_FILE_SIZE"
value="30000" /-->
<!-- Name of input element determines name in $_FILES
array -->
Send this file: <input name="userfile" type="file" />
<div align="center"><input type="submit"
value="Send File" /></div>
</fieldset>
</form>
<br>
<br>
<form action="delete.php" method="post">
<fieldset><legend>Delete Professor
Image</legend>
<select name="deleteFile">
<?php echo($file_list); ?>
</select>
<div align="center"><input type="submit" name="go"
value="Delete File"></div>
</fieldset>

AdonaiEchad wrote:
> There is a file upload that I have and I am getting an
error...
> Notice: Undefined variable: file_list in
C:\vhosts\mysite\upload\index.php on
> line 20
> On line 20 in my php page happens to be the following
code that is giving an
> error...$file_list .= "<option value=\"$file\"
>$file</option>";
What that's telling you is that you're adding a value to a
variable that
doesn't yet exist. In your case, it probably doesn't matter,
but using
undefined variables is a potential security risk. To
eliminate the
warning - and the risk - declare $file_list before using it:
$file_list = '';
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • File Upload issue in MVC

    Hi,
    For my MVC application, I have created a main controller.
    On the DO_REQUEST of the main controller, I am setting the sub controllers, and directly calling that controller using create_controller, controller_set_active, and call_controller.
    I included dispatch_input( ) in the Main controller's DO_REQUEST method.
    Inside the DO_REQUEST  of the sub controller, I am creating a view using create_view and call_view methods.
    In this view, I have a <htmlb:tableView /> and a <htmlb:fileUpload />, with a button. The issue is that, when the button is clicked, in the DO_HANDLE_EVENT method of the sub-controller, I am not getting the File Data, or the table data.
    For File upload, I use the following -
    data lv_fupld_data TYPE REF TO cl_htmlb_fileupload.
    lv_fupld_data ?= cl_htmlb_manager=>get_data(
                          request = runtime->server->request
                          name    = 'fileupload'
                          id      = 'fupld_1').
    I have the <htmlb:form method       = "post"
                      encodingType = "multipart/form-data" > etc in the view.
    When I call this sub-controller directly from the browser (after including the dispatch_input( ) part in DO_REQUEST), I do not get any issue. I am able to read the file data and upload the file.
    Any Idea why this is happening?

    Hi Rakesh,
    I think I got your problem:
    You only have the htmlb:form in your view of the subcontroller, and not in the main view.
    Therefore the subcontroller works by itself, but not within the main controller.
    If you are including subcontrollers, then make sure the form element is only present in the view of the main controller, wrapping around any subcontroller calls. And don't use the form tag anymore in the subcontrollers.
    Just as you put dispatch_input() just in your top controller, also place htmlb:form only in your top view.
    Regards,
    Max

  • 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

  • File upload issue in Portlet

    Hi Friends,
    I'm using FileUpload in one of my screen, so I'm using form enctype="multipart/form-data" and using apache commons fileUpload library. The file upload is working fine and I'm navigated from 1st screen to the 2nd screen.
    but in the 2nd screen, I have an anchor link, to navigate back to the 1st screen
    <li><a href="javascript:void (0)" onclick="'<%=renderResponse.createActionURL().toString()+"&paramView=Test1"%>'"> Test1</a></li>.
    When I click the anchor link in the 2nd screen, I'm getting the following exception,
    <ADFPortletServlet> <renderError>
    oracle.adfinternal.view.faces.renderkit.core.portlet.ADFPortletServletException: An error has occurred in the ADFPortletServlet
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.process(ADFPortletServlet.java:429)
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.doGet(ADFPortletServlet.java:349)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:74)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:324)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:163)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.adfinternal.model.portlet.psr.InvalidPortletServletRequest: Invalid request made to the portlet servlet.
      at oracle.adfinternal.view.faces.renderkit.html.portlet.ADFPortletServlet.process(ADFPortletServlet.java:380)
      ... 47 more
    Note :  I'm using webcenter 11.1.1.8 and this is WSRP 286 portlet. I'm using plain jsp to develop the portlet.
    Can anyone please help me in solving this exception. Any suggestion would be deeply welcomed.
    Thanks in Advance,
    Felix

    Hi Sreedhar,
    Thanks for your reply. I'm not able to access the document. I get the following message while trying to access the document. Are you able to access the document?
    Document cannot be displayed. Possible reasons are: 
    The document id was entered incorrectly. Please check and try again.
    The document id does not exist (was referenced incorrectly).
    The document is not classified as publicly accessible ("non-public").
    The content is being updated and it is temporarily unavailable but will be made available again soon.
    I don't have any problem in pulling the parameters from a Simple HTML Form with enctype="multipart/form-data" using JSR 286 portlets. But the problem is, if I do submit using the Form with enctype="multipart/form-data", in the next screen, the anchor link is not working, but submit buttons are working in the 2nd screen. If I'm navigated to the 2nd screen using default form enctype, I don't have any problem in the 2nd screen. I'm using Apache commons FileUpload.
    Here is my code.
        public void processAction(ActionRequest request,
                                  ActionResponse response) throws PortletException,
                                                                  IOException {
            if (!isMultiPartForm(request)) {
            // Determine which action.
            String okAction = request.getParameter(OK_ACTION);
            String applyAction = request.getParameter(APPLY_ACTION);
            if (okAction != null || applyAction != null) {
                // Save the preferences.
                PortletPreferences prefs = request.getPreferences();
                String param = request.getParameter(PORTLETTITLE_KEY);
                prefs.setValues(PORTLETTITLE_KEY, buildValueArray(param));
                prefs.store();
                if (okAction != null) {
                    response.setPortletMode(PortletMode.VIEW);
                    response.setWindowState(WindowState.NORMAL);
            String paramView= request.getParameter("paramView");
            PortletSession session=this.getSession(request);
            System.out.println("Setting the param view into the session ........."+paramView);
            session.setAttribute("paramView", paramView);
            }else{
                PortletFileUpload uploader =
                    new PortletFileUpload(new DiskFileItemFactory());
                List<FileItem> items;
                Map<String, String> formFieldsMap =
                    new HashMap<String, String>();
                Map<String, FileItem> nonFormFieldsMap =
                    new HashMap<String, FileItem>();
                try {
                    items = uploader.parseRequest(request);
                for (FileItem item : items) {
                        if (!item.isFormField()) {
                            String fieldName = item.getFieldName();
                            InputStream inpStream = item.getInputStream();
                            nonFormFieldsMap.put(fieldName, item);
                        } else {
                            String fieldName = item.getFieldName();
                            String value = getValue(item.getInputStream());
                            formFieldsMap.put(fieldName, value);
                    String paramView = (String)formFieldsMap.get("paramView");
                    if (paramView.equals("Test3")) {
                        PortletSession session=this.getSession(request);
                        System.out.println("Multi Setting the param view into the session ........."+paramView);
                        session.setAttribute("paramView", paramView);
                } catch (FileUploadException e) {
        private static String getValue(InputStream inp) throws IOException {
            BufferedReader reader =
                new BufferedReader(new InputStreamReader(inp, "UTF-8"));
            StringBuilder value = new StringBuilder();
            char[] buffer = new char[1024];
            for (int length = 0; (length = reader.read(buffer)) > 0; ) {
                value.append(buffer, 0, length);
            return value.toString();
        public boolean isMultiPartForm(ActionRequest request) {
            return PortletFileUpload.isMultipartContent(request);
        public PortletSession getSession(PortletRequest request){
            PortletSession session = request.getPortletSession();
            return session;
    Please provide your inputs.
    Regards,
    Felix

  • File Upload issue in 4.0

    Hi,
    I'm having problems with a file upload feature that no longer works after upgrading to 4.0. It used a stored procedure - it's old.
    ORA-20001: Invalid PL/SQL expression condition: ORA-06550: line 1, column 49: PLS-00103: Encountered the symbol "), false ); end;" when expecting one of the following: . ( ) , * @ % & | = - + < / > at in is mod remainder not range rem => .. <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
         Error      ERR-1024 Unable perform processing.
    I can't find what this is using the debug because it doesn't seem to show what caused the error:
    0.17200     0.00000     ...Do not run process "EMAIL: Manager Notification", process point=AFTER_SUBMIT, condition type=PLSQL_EXPRESSION, when button pressed=     3     
         0.17200     0.00000     Show ERROR page...     3     
         0.17200     0.00000     Performing rollback...     3     
         0.18700     0.00000     Processing point: After Error Header     3     
         0.18700     0.00000     Processing point: Before Error Footer     3     
         0.18700     -     ...Determine if user "MTERLESK" workspace "994601184274887" can develop application "20000" in workspace "994601184274887"     3     -
    I'm trying to rebuild the file upload from scratch but am now getting this error:
    Error      ORA-20001: Error: At most one DML process may be declared per page.
    I've had multiple DMLs on a page before.
    Any help is GREATLY appreciated.
    Thanks
    Matt

    I found it. It was part of a PL/SQL condition in an unrelated page process. I had a typo in the condition and that page process was never used.
    This was allowed to be saved in 3.1:
    :REQUEST in (GO')
    but when moving to 4.0, you had to edit the page process to see that there was an error due to the missing left single quote.
    thanks
    Matt
    Edited by: mterlesky on Aug 11, 2010 1:15 PM

  • APEX 3.1.2 Static File Upload Issues

    We are still running on APEX 3.1.2 though we hope to go to 4 very soon.
    We had a production problem this past week that is perplexing. I have seen other posts referencing similar issues but no solutions.
    We have an application that has several Static File Javascripts (.js). We already ran into the IE Upload bug so we only upload in Mozilla now.
    We had changes to one of the .js files (identity.js). I deleted the old file using the Shared Components screen and uploaded the new one. The action was "Successful" but the file was still the old version. We deleted a file of 73 lines of code and uploaded a new version of 28 lines. After successful upload, we still would get the 73 line version . The app was still getting that version too.
    I deleted it many times and tried again. I ran scripts to do both the delete and upload. I even deleted the file manually from the FLOWS_FILES table that held it. Still got the old version.
    We bounced the server (thinking it was cached somewhere) - still got the old version. Finally, in desperation, I started cloning the app to another app number in another Workspace. Since we use aliases, I thought I could use a clean Workspace and uplad the new file there. This worked but - suddenly the old Workspace started using the correct file.
    Is ther some secret cache somewhere that needs to be cleared out? I did not want to start randomly clearing out caches and there is no documentation on this issue.
    Is it something about our config - we have Oracle HTTP Server, OC4J, and modplsql for this environment with a 10g database.
    Any insight would be appreciated - my manager does not like "it fixed itself magically".

    We ruled out the browser caching by trying the app on several other people's PCs.
    I am thinking it is being cached somewhere in the APEX server environment but cannot find any documentation on where or what that might be.
    I think I might have triggered a refresh when I was trying to implement a cloned version (in a different Workspace). It seems that the scope of a JS file is within its Workspace so we figured that a new Workspace would treat the changed file as a new file - and it did. During this process, we had duplicate ALIAS for a minute and I think that confused the APEX App Engine and triggered the refresh.
    But that is a SWAG opinion.
    I also thought of "versioning" the JS files but our developers are not too keen. If we don't find another solution, that may be what we have to do.

  • File upload - issue with European .csv file format

    All,
    when uploading the .csv file for "Due List for Planned Receipts" in the File Transfer Upload center I receive an error.  It appears that it is due to the european .csv file format that is delimited by semicolon rather than comma. The only way I could solve this issue is to change Regional and Language options to English. However, I don't think this is a great solution as I can't ask all our suppliers to change their settings.  Has anyone come across this issue and another way of solving it?
    Thank you!
    Have a good day,
    Johanna

    Igor thank you for your suggestion. 
    I found this SAP note:
    +If you download a file, and the formatting of the CSV file is faulty, it is possible that your column separator does not match the standard settings of the SAP system. In the standard SAP system, the separator is ,.
    To ensure that the formatting is correct, set your global default for column separation in your system, so that it matches that of the SAP system you are using.+
    To do that Microsoft suggests to change the "List separator" in the Regional and Language Options Customize view. Though like you suggest that does not seem to do the trick. Am I missing something?
    However, if I change the whole setting from say German to English (UK) the .csv files are comma delimited and can be easily uploaded.  Was hoping there would be another way of solving this without need for custom development.

  • Flex file upload issue with large image files

         Hello, I have created a sample flex application to upload an image and also created java servlet to upload and save image and deployed in local tomcat server. I am testing the application in LAN. I am able to upload small as well as large image file(1Mb) from some PCs but in some other PCs I am getting IOError while uploading large image files however it is working fine for small images. Image uploading is hanging after 10%-20% and throwing IOError. *Surprizgly it is working Ok with XP systems and causeing issues with Windows7 systems*.
    Plz give me any idea to get a solution.
    In Tomcat server side it is giving following error:
    request: org.apache.catalina.connector.RequestFacade@c19694
    org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:371)
            at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.ja va:126)
            at flex.servlets.UploadImage.doPost(UploadImage.java:47)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
            at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProto col.java:594)
            at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
            at java.lang.Thread.run(Thread.java:722)
    Caused by: org.apache.commons.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStre am.java:982)
            at org.apache.commons.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:8 86)
            at java.io.InputStream.read(InputStream.java:101)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:96)
            at org.apache.commons.fileupload.util.Streams.copy(Streams.java:66)
            at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:366)
    UploadImage.java:
    package flex.servlets;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import java.text.*;
    import java.util.regex.*;
    import org.apache.commons.fileupload.servlet.ServletFileUpload;
    import org.apache.commons.fileupload.disk.DiskFileItemFactory;
    import org.apache.commons.fileupload.*;
    import sun.reflect.ReflectionFactory.GetReflectionFactoryAction;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class UploadImage extends HttpServlet{
             * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
             *      response)
            protected void doGet(HttpServletRequest request,
                            HttpServletResponse response) throws ServletException, IOException {
                    // TODO Auto-generated method stub
                    doPost(request, response);
            public void doPost(HttpServletRequest request,
                            HttpServletResponse response)
            throws ServletException, IOException {
                    PrintWriter out = response.getWriter();
                    boolean isMultipart = ServletFileUpload.isMultipartContent(
                                    request);
                    System.out.println("request: "+request);
                    if (!isMultipart) {
                            System.out.println("File Not Uploaded");
                    } else {
                            FileItemFactory factory = new DiskFileItemFactory();
                            ServletFileUpload upload = new ServletFileUpload(factory);
                            List items = null;
                            try {
                                    items = upload.parseRequest(request);
                                    System.out.println("items: "+items);
                            } catch (FileUploadException e) {
                                    e.printStackTrace();
                            Iterator itr = items.iterator();
                            while (itr.hasNext()) {
                                    FileItem item = (FileItem) itr.next();
                                    if (item.isFormField()){
                                            String name = item.getFieldName();
                                            System.out.println("name: "+name);
                                            String value = item.getString();
                                            System.out.println("value: "+value);
                                    } else {
                                            try {
                                                    String itemName = item.getName();
                                                    Random generator = new Random();
                                                    int r = Math.abs(generator.nextInt());
                                                    String reg = "[.*]";
                                                    String replacingtext = "";
                                                    System.out.println("Text before replacing is:-" +
                                                                    itemName);
                                                    Pattern pattern = Pattern.compile(reg);
                                                    Matcher matcher = pattern.matcher(itemName);
                                                    StringBuffer buffer = new StringBuffer();
                                                    while (matcher.find()) {
                                                            matcher.appendReplacement(buffer, replacingtext);
                                                    int IndexOf = itemName.indexOf(".");
                                                    String domainName = itemName.substring(IndexOf);
                                                    System.out.println("domainName: "+domainName);
                                                    String finalimage = buffer.toString()+"_"+r+domainName;
                                                    System.out.println("Final Image==="+finalimage);
                                                    File savedFile = new File(getServletContext().getRealPath("assets/images/")+"/LowesFloorPlan.png");
                                                    //File savedFile = new File("D:/apache-tomcat-6.0.35/webapps/ROOT/example/"+"\\test.jpeg");
                                                    item.write(savedFile);
                                                    out.println("<html>");
                                                    out.println("<body>");
                                                    out.println("<table><tr><td>");
                                                    out.println("");
                                                    out.println("</td></tr></table>");
                                                    try {
                                                            out.println("image inserted successfully");
                                                            out.println("</body>");
                                                            out.println("</html>");  
                                                    } catch (Exception e) {
                                                            System.out.println(e.getMessage());
                                                    } finally {
                                            } catch (Exception e) {
                                                    e.printStackTrace();

    It is only coming in Windows 7 systems and the root of this problem is SSL certificate.
    Workaround for this:
    Open application in IE and click on certificate error link at address bar . Click install certificate and you are done..
    happy programming.
    Thanks
    DevSachin

  • CF8.01 Large Files Upload issue

    We are having an issue with posting large files to the server
    through CFFile. Our server is running on Windows 2003 R2 SP2 with
    2GB of RAM. The average upload size is 800MB and we may run into
    multiple simultaneous uploads with the large file size. So, we have
    adjusted the "Maximum size of post data" to 2000 MB and "Request
    Throttle Memory" to 5000 MB in the ColdFusion admin setting to
    hopefully can allow up to 5 simultaneous uploads.
    However, when we tried to launch two 800MB uploads at the
    same time from different machines, only one upload can get through.
    The other one returned "Cannot connect to the server" error after a
    few minutes. No errors can be found in the W3C log and the
    ColdFusion logs (coldfusion-out.log and exception.log) but it is
    reported in the HTTPErr1.log with the following message:
    2008-04-18 08:16:11 204.13.x.x 3057 65.162.x.x 80 HTTP/1.1
    POST /testupload.cfm - 1899633270 Timer_EntityBody DefaultAppPool
    Can anyone shed some light of it? Thanks!

    quote:
    Originally posted by:
    Newsgroup User
    Don't forget that your web server (IIS, Apache, etc.) can
    have upload
    throttles as well.
    We did not throttle our IIS to limit the upload/download
    bandwidth.
    Is there a maximum limit for "Request Throttle Memory"
    setting? Can we set it over the available physical RAM size?

  • Multiple file upload issues

    I'm trying to create a simple web form capable of uploading multiple image files. I've followed the instructions as per  July 12, 2012, " Customizing Web Forms", "Adding multiple file attachment fields to the web form" and everthying seems to indicate that's it working, however when I go to "related files under cases I only see one file. Any ideas?

    Yes, you'll find it here: http://www.pikassopets.com/order/upload

  • Raw file upload issue

    Suddenly Bridge has stopped uploading RAW (.NEF) files from my Nikon D80. I only get the .jpgs. I can't figure out why. I'm running Photoshop CS3 with the 8.1 converter and Bridge CS3...
    Anyione have an idea???

    I am working from the camera, which had worked previously, as I have no card reader.
    I have many hundreds of gigabytes free...I am able to copy the .NEF files off the camera via the Windows copy utility...it just seems as if Bridge suddenly doesn't recognize the .NEFs...
    Bizarre!

  • 9iAS DAD file upload

    I have no problem with HTMLDB running against the OHS that installed with my 9i database server. When I create a DAD on my 9iAS server and access HTMLDB on the database everything but the file upload seems to work. What am i missing?
    ANdrew

    the four DAD parameters that play into the file upload process are PlsqlDocumentTablename, PlsqlDocumentPath, PlsqlDocumentProcedure, and PlsqlNLSLanguage. our default install would have you set up the first three parms as...
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDocumentPath docs
    PlsqlDocumentProcedure wwv_flow_file_manager.process_download
    ...the PlsqlNLSLanguage parameter's value is specific to your db setup. to figure out that value, you could run this proc...
    set serveroutput on;
    declare
    l_NLS_LANGUAGE varchar2(100) default null;
    l_NLS_TERRITORY varchar2(100) default null;
    l_NLS_CHARACTERSET varchar2(100) default null;
    begin
    select value
    into l_NLS_LANGUAGE
    from nls_database_parameters
    where parameter = 'NLS_LANGUAGE';
    select value
    into l_NLS_CHARACTERSET
    from nls_database_parameters
    where parameter = 'NLS_CHARACTERSET';
    select value
    into l_NLS_TERRITORY
    from nls_database_parameters
    where parameter = 'NLS_TERRITORY';
    sys.dbms_output.put_line ( 'nls_language = {'||l_NLS_LANGUAGE ||'}');
    sys.dbms_output.put_line ( 'nls_territory = {'||l_NLS_TERRITORY ||'}');
    sys.dbms_output.put_line ( 'nls_characterset = {'||l_NLS_CHARACTERSET ||'}');
    sys.dbms_output.put_line ( 'add this line to your DAD config:');
    sys.dbms_output.put_line ( 'PlsqlNLSLanguage '||l_NLS_LANGUAGE||'_'||l_NLS_TERRITORY||'.'||l_NLS_CHARACTERSET );
    end;
    i'm hoping that correctly setting up these four DAD parameters will fix your file upload issue. if not, please do let us know (including specific details).
    thanks,
    raj

  • Issues with file upload in flex mobile application (sharepoint as backend)

    Hello,
    I am working on flex mobile application for android platform for which we are having sharepoint as a backend.
    (Flex SDK 4.6 and AIR 3.9)
    Issue which we are facing is as follows:
    We are communicating with the backend server using webservices: example:
    <s:WebService id="kWebService" wsdl="http://www.kservice.net/kdatabaseservice.asmx?WSDL" >
                <s:operation name="AddPost"
                             resultFormat="object"
                             result="addPostResult(event)"
                             fault="postsfaulterr(event)" />
    </s:WebService>
    Above services are working fine but we are facing issue with one service which is related to file upload.
    File upload for <10 MB is working fine but when we try to upload larger file on server it fails to process.
    We are sending bytearray to the backend and backend code is writing those bytearray into file.
    We have tried many ways to overcome from this situation. like we have checked configuration for file upload size on server , we have tried wcf services as well. Please help us on this criticle point as soon as possible
    Thanks
    Dhwani

    Prashant8809 wrote:
    Hi
    >
    > I have already gone through the video by Thomas Jung for multiple file upload but it saves the contents in server and not in >transparent table. So please suggest me alternative solutions.
    >
    >
    > Regards
    > Prashant Chauhan
    What do you mean that my video saves the contents int he server and not in transparent table?  I save the data into a temporary database table so it can be accessed by the parent WDA session. From there the WDA session can do whatever it wants with it.  What do you mean by transparent table - that would be a database table. Do you actually mean internal table?  if so, just read the data from the temporary database table into memory.

  • File upload component and text area issue

    Hi guys,
    I have static text, text area and button on the same page. Text area binded to session bean value and all works fine (I can input text into text area and press button to save changes).
    After adding file upload component to the same page I have got a problem - now after page refreshing the non english characters inside text gets trashed.
    Other non english characters - inside static text components remains the same - the problem relates only to text area.
    It looks like file upload component code has an encoding related bug. Is that a known issue?
    And may be somebody have a workaround?
    Thanks.

    Hi Rom@n,
    I did some checking and this issue is currently logged as: 6442528. It is scheduled to be available in the next patch release. I'm sorry I don't have a time frame for the patch since it is still waiting for other fixes.
    Sorry for the inconvience.
    Lark
    Creator Team

  • Integrated Planning - File upload - Locks issue

    Hi
    When we try to use file upload feature (planing function- how to guide) , it gives us error that says " Data is locked by user .....". We checked and we had one user in the layout so system had lock entry in SM12 transaction.
    Is there any way - we can release the locks created by user before we execute the file upload process automatically so that we donot have to go to SM12 to delete it and then trigger upload process?
    Is it recommended to delete such locks from SM12 using ABAP code ?
    Please help.
    Thanks
    A

    Hi ,
    Pls chk this link for complete doc abt Locking in IP.
    http://help.sap.com/saphelp_nw70/helpdata/en/44/588168ce8c08fae10000000a422035/content.htm
    *pls assign points,if link is useful*
    Regards
    CSM reddy

Maybe you are looking for