Closed josephcrowell closed 2 months ago
@josephcrowell what happens if you run fromPost()
directly. ie.
$attachment = new File();
$attachment->fromPost(Input::file('attachment'));
$attachment->save();
I'll give it a go and see. No issues yet but I'll give it a couple days.
@josephcrowell this (https://github.com/wintercms/storm/blob/develop/src/Database/Attach/File.php#L570) is where it is supposed to be handling that for you, can you try some debugging around there to figure out why it is not?
It's happening in production but I haven't been able to trigger it in my development environment. My best guess is that the uploads aren't being detected as instanceof UploadedFile. Could it possibly have something to do with the fact that I'm using this file uploader https://v5-standard-6.legacydocs.mdbootstrap.com/docs/standard/plugins/file-upload/ instead of a standard file input?
@josephcrowell is there any difference in the requests sent by that uploader on production vs development? I can't think of why it should be any different from any other file uploader.
Also is your code in production exactly what you provided?
Yes it's the same code. I haven't gotten the error again after directly using fromPost. Internally that uploader is a standard file input. It just has a drop target tacked on.
Very odd indeed. I'll close this for now then, let me know if it comes back or if you can replicate it on a fresh install.
Will do.
Winter CMS Build
dev-develop
PHP Version
8.1
Database engine
MySQL/MariaDB
Plugins installed
No response
Issue description
I've been seeing this again which seems to be a regression of https://github.com/octobercms/october/issues/5270
Stack Trace:
Steps to replicate
Workaround
No response