public static function addPostAttachmentPhoto($data, $post_id)
 {
     foreach ($data as $picture) {
         $photo = new Photo();
         $photo->user_id = 0;
         $genFileName = Yii::$app->security->generateRandomString(20);
         $img = new Image($genFileName, ImageTypes::PostPhoto(), new ImgMediaLoc(), $picture);
         $img->save();
         $photo->filename = $genFileName;
         $photo->type = "postPhoto";
         PostsService::addPostAttachmentPhoto($post_id, $genFileName);
         $photo->save();
     }
 }