FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
176 stars 95 forks source link

Compatibility with beta 16 #272

Closed julienthomas closed 3 years ago

julienthomas commented 3 years ago

Hello. The core beta 16 uses illuminate/validation v8 wich uses symfony5. Passing file size is now deprecated when instancing Symfony\Component\HttpFoundation\File\UploadedFile, so the newly created instance is always flagged as invalid. Possible solution (from FoF\Upload\Repositories\FileRepository::moveUploadedFileToTemp):

$file = new Upload(
    $tempFile,
    $upload->getClientFilename(),
    $upload->getClientMediaType(),
    $upload->getError(),
    true
);
Gasjki commented 3 years ago

I'm looking forward for the next release. I made a mistake and I updated my website and now I can't show my uploaded images anymore.