![]() Stream requestStream = request.GetRequestStream() Request.ContentLength = fileContents.Length IMAGE FILES ONLYīyte fileContents = File.ReadAllBytes(sourcePath filename ".jpg") // THIS THROWS AN ERROR WHEN DEPLOYED Request.Credentials = new NetworkCredential("username", pass) String pass = Environment.GetEnvironmentVariable("FTP_ACCESS") String sourcePath = dpi with no matching 300 dpi scans\" įilename.Substring(0, 1) targetPath = Get the object used to communicate with the server.įtpWebRequest request = (FtpWebRequest)WebRequest string sourcePath = "C:/airsick/100 dpi with no matching 300 dpi scans/" However when I deploy to the web, I get an error thrown from File.ReadAllBytes: public void UploadFile(String filename) I am successfully able to do this while debugging from Visual Studio. I am trying to let people upload files from their machines to my website via FTP.
0 Comments
Leave a Reply. |