Always when it comes to the part of uploading files, photos and videos there arises some confusion of how doing this. In one way we can use BLOB type in database and then store the images or videos in that. But this is not the good way. In another type we store all the uploaded files in one folder and save the path location.
We are using built-in file upload control in asp.net. But how to use that for video upload?
Because video upload includes transfer of files continuously for some amount of time, means streaming. In that time add
HttpPostedFile attFile = FileUpload2.PostedFile;
int attachfilelength = attFile.ContentLength;
int attachfilelength = attFile.ContentLength;
if (attachfilelength > 0)
{
.....// rest code goes here
}
This will make the continuing streaming and will upload video files also.
Note: This method will take time and will be somewhat slow.
No comments:
Post a Comment