Uploading files - Saving data to file

Results 1 to 3 of 3

Thread: Uploading files - Saving data to file

  1. #1
    Srilatha Guest

    Default Uploading files - Saving data to file

    My upload asp code gives this problem - After the file contents are parsed, I use the foll. piece of code to change it to unicode and write the resulting contents to a file.<BR><BR>file1 = UploadRequest.Item("File1").Item("Value")<BR>Set filesysobj = Server.CreateObject("Scripting.FileSystemObject")< BR> Set fileobj = filesysobj.CreateTextFile(Upload_path & "\" & "file1",True)<BR> <BR> for i=1 to LenB(file1)<BR> fileobj.Write chr(AscB(MidB(file1,i,1)))<BR> Next<BR> fileobj.Close<BR><BR> the code works fine with a text file, but not with files of any other type. for example in a word file, all non-Ascii characters appear as garbage in the resulting file. Is this the right way of storing?Also how do I specify the file extension in my asp code generalized.<BR><BR><BR>My concern is when downloading a file, how can I perform a binary read on the file and retrieve back the contents in the appropriate format.<BR><BR>Can someone help me out with this. Appreciate your help really.<BR><BR>Thanks,<BR>Srilatha

  2. #2
    agsenthil@usa.net Guest

    Default RE: Uploading files - Saving data to file

    There are some COM components freely available in Web (like in<BR>FreeVBCode.com) that will do the "Uploading" of any format of<BR>file into Server. Use one. Because as such, ASP doesn&#039t offer<BR>much for Uploading, I believe (I may be wrong...I&#039m a newbie...)<BR>And, visit :<BR>http://www.4guysfromrolla.com/webtech/amb/amb.beginnerasp.shtml<BR>for some tips on Uploading. Good Luck.<BR>-Senthil.

  3. #3
    Srilatha Guest

    Default RE: Uploading files - Saving data to file

    Thanks for your reply, I checked out and got some new tips.<BR><BR>Thanks once again,<BR>Srilatha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts