Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
将文件上传到服务器并调用控制器方法时,是否HttpPostedFileBase包含整个文件或仅包含名称、路径等信息?
HttpPostedFileBase
我想知道的是文件是否立即上传到服务器,直到调用SaveAs(path)?
SaveAs(path)
由于该文件是您请求的一部分,因此会立即上传。它只是缓冲到一个临时文件中,一旦您发送响应,系统将删除该临时文件。
如果您使用另存为,您只需将文件传输到永久位置。