-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Porting this project to MVC Core 7 required a major rewrite (not your fault or problem, just life).
Part of the rewrite was understanding the existing code..
It appears to me that there's an issue with the ImageHandler helper class.
Based on what I'm seeing, the LoadImage method is pulling the entire file from the client, then resizing, to create a thumbnail.
This means a couple of things.
- The file is being loaded twice (once in the ImageHandler helper class and again in the FilesHelper UploadPartialFile).
- The upload occurring in the ImageHandler helper class appears to be a non-chunked upload (meaning the one occurring in the FilesHelper helper class is not only redundant, but that one of the two is also potentially problematic in that it uploads the whole file at one go).
I'm not sure, but it seems like it might be possible to upload the file chunked, then pass the file stream to the ImageHandler class before closing it?
One way or another though, if people are wondering why there's an issue with large files, this may be part of the reason.
I know it may have been some time since you looked at or worked on this. I just thought it might be helpful to others to know this "issue" exists.