0

I have a simple dialog box:

    <div data-role="dialog" id="uploadImage" data-title="Upload Image" data-needs-auth="true">
    <div data-role="header" data-position="fixed" data-theme="b">
    <a href="#subMenu" data-icon="back" data-iconpos="notext"></a>
    <h1>Upload Image</h1>
    </div><!-- /header -->           
    <div data-role="content">                       
    <form name=uploadForm method=post enctype="multipart/form-data" action="uploadbi.php" data-ajax="false">
    <input type=file name=filename>
    <input type=hidden name=MAX_FILE_SIZE value=8000000>
    <input type="submit" value="Upload Image" data-theme="a" data-inline="true">
    </form>
    </div>
    </div>
    </div>

enter image description here

The problem is that it does not pass the filename field. From Firebug:

Post Parameters
application/x-www-form-urlencoded
MAX_FILE_SIZE   8000000
seid    6e540f68067707233241eb170ca83c43
Source
MAX_FILE_SIZE=8000000&seid=6e540f68067707233241eb170ca83c43

This is running under Firefox and I verified that it also fails under Chrome. It's been forever since I've dealt with file uploads in a form. What am I missing?

1 Answer 1

1

Last month I had a similar problem. Try to add data-ajax="false" on your form definition and see if that will help.

For more information, you could check this link.

Sign up to request clarification or add additional context in comments.

4 Comments

Hm... Maybe is somekind stupidly but try to add also name="submit" id="submit" in the submit input
Okay. Not a problem. It's been so long since I dealt with the file uploads that I forgot that the filename is NOT passed in the $_POST array (where I was looking) but the $_FILES array.
@mlewis54 did you figure out a way to do it can you please explain i have the same problem ?
Yes, look at my last comment. I was referring to the wrong variable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.