Results 1 to 4 of 4
Thread: File upload not working from IOS
Jan 5, 2013, 06:02 #1
- Join Date
- Oct 2004
- 0 Post(s)
- 0 Thread(s)
File upload not working from IOS
Thank you in advance for your help
Thanks to IOS 6 we can now upload photos straight from the iphone using either "Take Photo" or "Choose Existing"
"Choose Existing" is fine however when we select "take a photo" the upload fails.
We are using a standard html form that we have used for years. Could it be that the when we take a picture it is has no filename and this is causing the problem?
<form action=thankyou.php method=post enctype="multipart/form-data"> <input type=file name="photo1" id="message" placeholder="" class="required" accept="image/*" capture> <input type=submit name=submit value="send feedback"> </form>PHP Code:
$target = "photos/";
$target = $target . basename( $_FILES['photo1']['name']) ;
//This is our size condition
if ($uploaded_size > 350000)
echo "Your file is too large.<br>";
//This is our limit file type condition
if ($uploaded_type =="text/php")
echo "No PHP files<br>";
//Here we check that $ok was not set to 0 by an error
//If everything is ok we try to upload it