Welcome Guest, Not a member yet? Register   Sign In
I have a weird issue with CI and file upload class.
#1

[eluser]Unknown[/eluser]
Hi, I implemented file upload class to my application but I have a weird issue with CI and file upload class.
I am using MAMP 2.2 as localhost.
The first time I used this class I did it using CI tutorial and I was receiving a "requested has timed out". I checked everything, php max upload limit, php timerequest but no success. Then I tough my code was the problem so I redo the CI tutorial several times with no success.I was Always getting "requested has timed out". Suddenly by accident I double-click my form and the application worked. Then I tried the the form forcing an error( no selecting a file, or choosing a extension that I did not want to upload) and after forcing the error , I tried the form whit valid values and the form worked with only one click. At that moment I supposed that it was a problem with the URL. I changed in my confing.php

$config['index_page'] = 'index.php'
$config['uri_protocol'] = 'REQUEST_URI';

to

$config['index_page'] = 'index.php'
$config['uri_protocol'] = 'ORIG_PATH_INFO';

But I got the opposite. uploading with out an error was available with one click and double click with an error.

I proceeded to try all the configuration in config.php including

$config['index_page'] = 'index.php?'

but nothing!!!!!!

Does anyone know what is the problem and how I can fix it? again my code is the CI upload tutorial and I am using mamp 2.2
Thanks!
#2

[eluser]Tim Brownlaw[/eluser]
ok, Why would you want to "Double" Click?

Without knowing what you've actually written.... as you've not pasted any code examples,
I'm assuming you are using a form submit button => "File Upload', after selecting the file...

Are you getting the image actually uploaded? Does it appear in the folder you specified?

If the Chosen File field is reset after submission and doing a 2nd click, you should display a message "Choose a File" ( or similar )
Do you want people to upload the same file multiple times?

If that's working, you are done!

Cheers
Tim




Theme © iAndrew 2016 - Forum software by © MyBB