Hi, I think Im going nuts , please someone show me the way!!!!!<BR><BR>I am trying to upload a gif image, to save it to disk, I have used a multi-part form, posting the data to a second asp page, some code from is shown below.<BR>I can display the uploaded image no problem, but when I try and write it to a file, the gif is not recognised, cos it seems to have some extra crappy chars at the start of the page.<BR><BR>sFormSize = Request.TotalBytes<BR>sFormData = Request.BinaryRead(sFormSize)<BR>bnCRLF = chrB(13) & chrB(10)<BR><BR>&#039;Get only Gif Section of Posted Form data...<BR>sDivider = LeftB(sFormData,Instrb(sFormData,bnCRLF) - 1)<BR>sDataStart = InstrB(sFormData, bnCRLF & bnCRLF) + 4<BR>sDataEnd = InstrB(sDataStart + 1, sFormData, sDivider) - sDataStart<BR><BR>&#039;Got My Gif<BR>sFileData = MidB(sFormData,sDataStart,sDataEnd)<BR><BR>&#039;T his is just debug, I can display Gif, very Nice...<BR>&#039;Response.ContentType = "image/gif"<BR>&#039;Response.ContentType = "text/plain"<BR>&#039;Response.BinaryWrite sFormData<BR>&#039;Response.BinaryWrite sFileData<BR>&#039;Response.end<BR><BR>Set objFSO = CreateObject ("Scripting.FileSystemObject")<BR><BR>Set objFile = objFSO.CreateTextFile (Server.MapPath("cartonstylessomefile.gif"), True)<BR>Set objFile = objFSO.GetFile(Server.MapPath("cartonstylessomefil e.gif"))<BR><BR>Set objStream = objFile.OpenAsTextStream (2,-1)<BR><BR>&#039;Output binary chars to file...<BR>For nIndex = 1 to LenB(sFileData)<BR> objStream.Write Chr(AscB(MidB(sFileData,nIndex,1)))<BR>Next<BR><BR >objStream.Close<BR><BR>Set objFile = Nothing<BR>Set objFSO = Nothing<BR>