A
A
Andr Lw12015-05-03 20:39:16
JavaScript
Andr Lw1, 2015-05-03 20:39:16

Ajax. If a lot of files are being loaded, it gives an error 500 (Internal Server Error). Why?

Sending a POST request:

<script>
          var form = document.querySelector('.form');
          var request = new XMLHttpRequest();

          form.addEventListener('submit', function(e){
            e.preventDefault();

            var formdata = new FormData(form);

            request.open('post', 'http://website.loc/admin/addimgs{{$post->id}}');
            request.send(formdata);
          }, false);
        </script>


If you send a couple of files, it loads normally.
But if you upload, for example, 15 pictures, it gives an error:
500 (Internal Server Error)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gregory, 2015-05-03
@lw1

Are these 15 files in total smaller than the upload_max_filesize variable ?
In total, these 15 files are all other data (cookies, etc.) smaller than the post_max_size variable ?
Another rule #1: Error 500 - look at the logs. What is written in the logs about this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question