Ask a Question related to ASP.NET Web Services, Design and Development.
-
Andrew Chan #1
Problems: uploading files have Chinese named files
Hi everyone,
I try to upload file by using asp.net, code like that:
<script language="VB" runat="server">
Sub Upload(Source As Object, e As EventArgs)
If Not (myFile.PostedFile Is Nothing) Then
Dim intFileNameLength as Integer
Dim strFileNamePath as String
Dim strFileNameOnly as String
'Logic to find the FileName (excluding the path)
strFileNamePath = MyFile.PostedFile.FileName
intFileNameLength = Instr(1, StrReverse(strFileNamePath), "\")
strFileNameOnly = Mid(strFileNamePath,
(Len(strFileNamePath)-intFileNameLength)+2)
myFile.PostedFile.SaveAs("c:\inetpub\wwwroot\yourw ebapp\upload\" &
strFileNameOnly)
lblMsg.Text = "File Upload Success."
lblFileContentType.Text = "Content type: " &
MyFile.PostedFile.ContentType
lblFileSize.Text = "File size: " & CStr(MyFile.PostedFile.ContentLength)
& " bytes"
End If
End Sub
</script>
It is OK with uploading english named file, but not in chinese named files.
Any one can help me to solve this problem.
Many Thanks,
Andrew
Andrew Chan Guest
-
Problem with windows not liking any files named prn
I recently found a problem with windows not liking any files called prn.html, prn.cfm etc etc. If you try and create a file like prn.html then it... -
Uploading files
Hi, Can someone point me in the right direction for how I can upload a file to the server, and overwrite the existing file if there is one. ... -
Having problems uploading big files
Hi, We're using a php script to upload/download files to our server and when trying to upload files bigger than 500kb the browser redirects to... -
Uploading files using FTP in ASP.NET
If you follow this link, you'll find a few ftp samples: http://www.gotdotnet.com/community/usersamples/Default.aspx?query=ftp Here's one that... -
renaming badly named files...
Hi All, I am looking for a perl code fragment, or utility that will enable me to rename badly named files and/or dir elements to such files, by...



Reply With Quote

