Welcome Guest, Not a member yet? Register   Sign In
Error while uploading multiple image files
#1
Question 

Hello,




I've been trying to upload multiple images using CI's (version 3.1.11) File Uploading Class with partial success so far.




I say "partial", because as long as I do not select more than 4 files everything goes fine. Images get uploaded without any errors. If I select 5 or more images I get "The action you have requested is not allowed." error.






These are the files:


          File name                     Size in KB

  • 20191030_162750.jpg 1664
  • 20191030_162827.jpg 1768
  • 20191030_162850.jpg 1680
  • 20191030_162815.jpg 1720
  • 20191030_162833.jpg 1632
  • 20191030_162915.jpg 1700
  • 20191030_162821.jpg 1948
  • 20191030_162838.jpg 1772



I tried several different combination of 4 files, they all worked. When I select more than 4 then it fails with the error message I mentioned above.




This is the HTML form code:



Code:
echo form_open_multipart('', ['id'   => 'frm_photos', 'class'=> 'form-horizontal']);

echo'<input type="file" name="photos[]" multiple class="form-control" />';

echo'<input type="submit" id="submit_button" value="Upload" class="btn btn-lg btn-primary btn-block" />';

echo'</form>';





The error message looks as though it may be related to CSRF protection which is enabled in the CI's config.php.



CI version is 3.1.11






Anybody has an idea why this may be happening ?




Thanks,
Reply


Messages In This Thread
Error while uploading multiple image files - by Mobostar - 11-04-2019, 05:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB