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

Fixes issues with gif images not animating #755

Merged
merged 2 commits into from
Mar 24, 2018
Merged

Fixes issues with gif images not animating #755

merged 2 commits into from
Mar 24, 2018

Conversation

Abijeet
Copy link
Member

@Abijeet Abijeet commented Mar 18, 2018

Close #223

Also fixes issues with improper error message when file is too large.

Abijeet added 2 commits March 19, 2018 01:44
See - Intervention/image#176

Fixes #223

Signed-off-by: Abijeet <abijeetpatro@gmail.com>
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
@@ -42,7 +42,7 @@ function mounted() {
}

if (xhr.status === 413) setMessage(trans('errors.server_upload_limit'));
if (errorMessage.file) setMessage(errorMessage.file[0]);
else if (errorMessage.file) setMessage(errorMessage.file);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I upload a very large file, this is the response I get along with the 413 status code. file[0] returns \. Hence made this modification.

I think I should check for errorMessage.message else set a default message instead?

{
    "message": "",
    "exception": "Illuminate\\Http\\Exceptions\\PostTooLargeException",
    "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
    "line": 24,
    "trace": [
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 149,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php",
            "line": 46,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 149,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php",
            "line": 53,
            "function": "Illuminate\\Pipeline\\{closure}",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
            "line": 102,
            "function": "Illuminate\\Routing\\{closure}",
            "class": "Illuminate\\Routing\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 151,
            "function": "then",
            "class": "Illuminate\\Pipeline\\Pipeline",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
            "line": 116,
            "function": "sendRequestThroughRouter",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/public/index.php",
            "line": 53,
            "function": "handle",
            "class": "Illuminate\\Foundation\\Http\\Kernel",
            "type": "->"
        },
        {
            "file": "/home/abijeet/Projects/BookStack/server.php",
            "line": 21,
            "function": "require_once"
        }
    ]
}

@Abijeet
Copy link
Member Author

Abijeet commented Mar 18, 2018

Will check the test cases failing, although I think its not related.

@Abijeet Abijeet closed this Mar 19, 2018
@Abijeet Abijeet reopened this Mar 19, 2018
@ssddanbrown ssddanbrown merged commit 2cfcbe0 into BookStackApp:master Mar 24, 2018
@ssddanbrown ssddanbrown added this to the BookStack Beta v0.20.1 milestone Mar 24, 2018
@ssddanbrown
Copy link
Member

Thanks again @Abijeet, Gave it a quick test, Appears to work great.

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

Successfully merging this pull request may close these issues.

Feature Request of .gif / .gifv support for animated snippets native on the page.
2 participants