iceman21122014-10-27 07:24:21
iceman2112, 2014-10-27 07:24:21

Ajax file upload. The server returns errors. Who will prompt in what there can be an error?

The task to be solved is loading an image via ajax.
Yii2. I'm using the \troy\ImageUpload\ extension, which uses the ajaxuploader plugin.
View code:

<?= Html::button('Upload', ['id' => 'UploadButton', 'class' => 'button button-submit']) ?>

        <?= \troy\ImageUpload\ImageUpload::widget(
                'targetId' => 'UploadButton',
                'config' =>[
                    'action' =>Yii::$app->getUrlManager()->createUrl(['user/upload'])
        ); ?>

I add an action extension to the controller, everything is by default, I didn’t change anything. Images load fine, but nginx throws out a trace. errors, can't figure out what the problem is: - - [27/Oct/2014:01:34:08 +0700] "POST /user/upload HTTP/1.1" 500 77589 " mysite.com/user/profile " "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36" - - [27/Oct/2014:01:34: 09 +0700] "GET /user/sizzle.min.map HTTP/1.1" 404 1700 " mysite.com/user/profile " "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium /37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36"

user/upload = this is an image upload action. He refers to him normally loads the image, and throws out 500?
And what kind of file sizzle.min.map, I don’t know at all.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Gregory, 2014-10-27

You are looking at access.log. Look in error.log - the details of error 500 are written there ... well, they should be written.
And the sizzle.min.map file is simply not found. The framework tries to load it instead of css.

Sergey Melnikov, 2014-10-27

remove the following line in the sizzle.min.js file //# sourceMappingURL=sizzle.min.map

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question