- Issue created by @kim.pepper
- Merge request !7494#3440955 Provide a method for FileUploads to be moved in UploadedFileInterface β (Closed) created by kim.pepper
- Status changed to Needs review
7 months ago 4:12am 15 April 2024 - π¬π§United Kingdom alexpott πͺπΊπ
I wonder if this is a good idea from a security implication. My concern is that only the FileUpload service should do this - which is separate to the validate method. I think it might be best to continue to handle the moves in FileUpload but we could have the type of move determined by the class or maybe we want an interface to indicate this. I think I'd use classes until we've got 3 or more objects implementing UploadedFileInterface.
I considered an alternative where we invert the control flow between the FileUploadHandler and instead have a UploadedFileInterface factory that creates objects that have the FileUploadHandler injected but I'm not sure that that gets us anywhere.
- Merge request !7513#3440955 Check for FormUploadedFile when moving file β (Closed) created by kim.pepper
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Created a new MR that just checks if it is a FormUploadedFile and uses
\Drupal\Core\File\FileSystemInterface::moveUploadedFile()
or otherwise\Drupal\Core\File\FileSystemInterface::move()
- π¬π§United Kingdom alexpott πͺπΊπ
Can we do this in an issue that creates InputStreamUploadedFiles otherwise we have to test via mocking or awkwardness?
I think the approach is fine and can be improved upon as needed.
- π¦πΊAustralia kim.pepper πββοΈπ¦πΊSydney, Australia
Yeah let's do this in π Refactor FileUploadResource to use FileUploadHandler RTBC
- Status changed to Closed: won't fix
7 months ago 8:46am 16 April 2024