Add file dowload validation to CreateProjectFromRemoteFileService
Problem statement
CreateProjectFromRemoteFileService
has a number of good pre-download validations that help verify that the file that is about to be downloaded is acceptable. There is another validation that can be introduced to help prevent undesired files (that exceed acceptable size) to be downloaded, which is similar to what has been done in !61511 (merged)
Proposed solution
While file is streamed, verify total bytes downloaded against the limit that is set. If the limit is exceeded - raise an error. This helps prevent situations where content-length header is spoofed and the actual file that is getting downloaded exceeded the limit.
Edited by George Koltsov