typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
424 stars 60 forks source link

Cannot upload any pictures in v2.0.3 #426

Closed lauraled closed 4 months ago

lauraled commented 4 months ago

Hello, I have set up a new instance of Typemill, originally with version 2.0.2 but I updated it to 2.0.3. I noticed that I cannot upload any pictures at all. Instead I receive an HTTP 500 error. If I look at the response in the network tab of the dev console, I can see this response so I suspect this to be an issue in the application rather than my configuration:

{
    "message": "Slim Application Error",
    "exception": [
        {
            "type": "Error",
            "code": 0,
            "message": "Call to undefined function Typemill\\Models\\imagecreatefromstring()",
            "file": "/usr/share/nginx/html/system/typemill/Models/Media.php",
            "line": 405
        }
    ]
}

I can upload other file types via the file block just fine.

Do you need me to provide further information?

Thank you.

Best regards Laura

trendschau commented 4 months ago

Hm, it works fine on my installations. Are you sure that the library GD-Image is installed on your server? And it worked on the same server with version 2.0.2? I did not changes that model in this release, the latest change is from first of November: https://github.com/typemill/typemill/commits/v2.x/system/typemill/Models/Media.php

So I think it could be related to missing library on server.

lauraled commented 4 months ago

I double checked my installed libraries and the php-gd package was actually missing. Image upload now works. Sorry for false alarm and thank you for the quick help. Btw, I meant to say that the issue also existed in v2.0.2, but since this was caused by the missing library, it doesn't matter anyway. Thanks and best regards Laura