wazo — 2013-01-05T07:02:13-05:00 — #1
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">
$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
eastcoast — 2013-01-05T08:05:25-05:00 — #2
If that's your complete form php code, it's extremely insecure - it'd be trivial to upload a malicious file.
wazo — 2013-01-05T11:24:18-05:00 — #3
It is purely for testing at the moment which is why it is basic, is their a reason why it would work on the web and not on IOS?
eastcoast — 2013-01-05T11:55:09-05:00 — #4