7h3ev1l from gitter (please don't post in multiple channels ?):

The local adapter is that images are saved in the flarum directory

would it be possible to add an overlay of some kind as an option if we tag an image or post with a "nsfw tag" or smth?

6 days later

POST https://xxx.x/api/extensions/flagrow-image-upload

<br />
<b>Fatal error</b>: Class 'Flarum\Database\AbstractMigration' not found in <b>/srv/users/serverpilot/apps/xxx/public/vendor/flagrow/flarum-ext-image-upload/migrations/2016_01_11_000000_create_flagrow_images_table.php</b> on line <b>18</b><br />

Hell what?

    7h3ev1l we need to update the extension to beta5. We'll do it in the following days.

    7h3ev1l the migrations for most of the Flagrow extensions have been readied, we need to fix the frontend constraints and test before releasing. Sadly I'm not fully available right now, we're aware this needs fixing and will do so as soon as humanly possible.

    I fixed it .. edit this file:
    /vendor/flagrow/flarum-ext-image-upload/migrations/2016_01_11_000000_create_flagrow_images_table.php
    with:

    <?php 
    namespace flagrow\image\upload\Migration;
    
    use Flarum\Database\Migration;
    use Illuminate\Database\Schema\Blueprint;
    
    
    return Migration::createTable(
        'flagrow_images',
        function (Blueprint $table) {
                $table->increments('id');
                $table->integer('user_id')->unsigned()->nullable();
                $table->integer('post_id')->unsigned();
                $table->string('file_name')->nullable();
                $table->string('upload_method');
                $table->timestamp('created_at');
        }
    );

      7h3ev1l It might be better to just submit a PR to the Flagrow team at their Image Upload Github page. Then users can install through composer like normal. I don't think most users are going to be comfortable manually editing files to make the extension work.

      Do you know I could get rid of this?

      Whenever I try to uninstall either, I get a 500 error.

        Just tagged version 0.2.0 which makes the extension compatible with Flarum 0.1.0-beta.5. Please let us know if you encounter any issues.

        Tagged 0.2.1 with the German translation, thank you Reflic.

        Is this:
        "General preferences
        Maximum file size (in kilobytes)"
        is for imgur too>?

        Lol i just updated and now i cant upload images to imgur ?

        I tried to reinstall it but still cant upload..

        Huh lol.. after few seconds its working but i dont get uploading progress.

        I am sorry...
        I am having issues using the latest version in the new beta...
        Using local storage the uploads fail.
        Debug Info:

        POST https://domain.com/forum/api/image/upload
        
        {
          "errors": [
            {
              "status": "404",
              "code": "route_not_found"
            }
          ]
        }
        

        Thank you in advance for any help you might be able to provide. =)

          f0r3v3r I have a strong feeling your package is misconfigured.. Did you try re-enabling the extension?

          For anyone having a similar issue, somehow php-gd was broken. Check that it is installed and enabled in php.ini.
          I am guessing the logic of the extension must have changed somehow, because it was working in the previous beta without it.

          Anyways... Thank you all for your time and consideration.

          Though I do wonder what is re-enabling an extension supposed to fix exactly?


          I have tried re-enabling and re-installing the extension. I have also checked permissions.
          Error log gives me no output...
          Access log gives me the following:

          [03/Apr/2016:23:39:20 +0200] "POST /forum/api/image/upload HTTP/1.1" 301 209
          [03/Apr/2016:23:39:20 +0200] "GET /forum/api/image/upload/ HTTP/1.1" 404 54
          


          I would also note that the DEBUG flag that appears says: "The requested resource was not found."

          What I don't understand is why it is even referencing that folder location?
          I created that location after trying to get it to work, but without that location existing it throws the following error:
          Oops! Something went wrong. Please reload the page and try again. DEBUG

          500 Internal Server Error
          POST https://domain.com/forum/api/image/upload
          
          null
          


          If I create that folder location I get the other error. I have left the default upload location at assets/images so , again, I am really unclear where this other directory is getting called from.


          However, looking again with that directory not existing, it does produce the following error:

          PHP Fatal error:  Call to undefined function Intervention\\Image\\Gd\\imagecreatefromjpeg() in /home/user/public_html/forum/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php on line 33, referer: https://domain.com/forum/d/45-thread-title
          

            We should add this as a required dependency to the package. "ext-gd". Not sure, but I assumed flarum/flarum had the same requirement. Thanks f0r3v3r for checking this.