Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error when I click add #46

Open
Sabirgojayev opened this issue Apr 11, 2017 · 0 comments
Open

500 Internal Server Error when I click add #46

Sabirgojayev opened this issue Apr 11, 2017 · 0 comments

Comments

@Sabirgojayev
Copy link

It returns 500 Internal Server Error when I try to add an image. The error is : Call to a member function addImage() on null

  1. in C:\OpenServer\domains\azreal.az\vendor\zxbodya\yii2-gallery-manager\GalleryManagerAction.php at line 111
    102103104105106107108109110111112113114115116117118119120 *
    • @return string

    • @throws HttpException
      */
      public function actionAjaxUpload()
      {

      $imageFile = UploadedFile::getInstanceByName('image');
      $fileName = $imageFile->tempName;
      $image = $this->behavior->addImage($fileName);

      // not "application/json", because IE8 trying to save response as a file

      Yii::$app->response->headers->set('Content-Type', 'text/html');

      return Json::encode(
      array(
      'id' => $image->id,
      'rank' => $image->rank,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant