I am trying to make a file uploader using html tags. This is my html for the file uploader:
<tr>
<td class="label" style="width:15%">
Upload File
</td>
<td class="description" >
<input type="file" id="FileUpload1" class="largeTextField" multiple="multiple"
style="width:260px;"/>
<input type="button" id="btnUpload" value="Upload" onclick="UploadFile()" />
</td>
<div class="validator" id="txtUploadFileVld" style="display: none">*</div>
</tr>
Below is my table in database:
CREATE TABLE [dbo].[tblFiles](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
[ContentType] [nvarchar](200) NOT NULL,
[Data] [varbinary](max) NOT NULL
ON [PRIMARY] TEXTIMAGE_ON [PRIMARY])
Now on onclick I have a function of UploadFile(). How do I code such that it access the filename and content type of the file. and also reads the file so I can save in it in the database.