laravel-filemanager: Uploading a regular file (PDF) causes UploadedFile::path() error

Looks like a method is used that doesn’t exists. I tried looking for other issues but the method $file->path() is only used when uploading files. When uploading images $file->getRealPath() is used. After replacing the first with the second for file uploads, I was able to upload files again.
PR: https://github.com/UniSharp/laravel-filemanager/pull/300
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
I agree that a token mismatch exception doesn’t have anything to do with the file size. The csrf token doesn’t seem to be valid. The token is sent along with every ajax request. Do you have any errors in your javascript console?
The filesize has nothing to do with a tokenMismatchException as far as I know. The GD Library does use a lot of memory so you might want to look at the bottom of config/laravel-filemanager.php to this setting: https://github.com/UniSharp/laravel-filemanager/blob/master/src/config/lfm.php#L167
Try increasing it to 512 or 1024M (but be sure you server can allocate such amount before increasing). I’m also still having some issues here and there with large files and I’m looking to move to Imagick since that should use less memory.