I’m trying to come up with a way to allow a user to upload a video he or she has made to an application I’m working on. My question is how or what is the best way to do this. I’ve heard of people converting the video to binary then saving to db but I also heard it’s not recommended to do this. How can I save these videos that are being uploaded. How does for example YouTube handle their videos? Any tips are appreciated thanks.
Maybe this?
System.Web.UI.WebControls.FileUpload
You generally wouldn’t use a WebForms control in an MVC application (depending on the intent of MVC here) so a basic HTML Input Element with type of file
<input type="file" name="video">should work for your needs. As for storage there are several possible solutions to this but all answers will be subjective and will need to be tailored based off of needs of the application (scaling, performance, availability, replication, security, etc.) As a first round solution it shouldn’t be out of the question to store the files on disk but that really depends on your environment needs and capabilities.