Results 1 to 6 of 6

Thread: FTP file upload not working properly

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    FTP file upload not working properly

    Hi all,

    I've made a program that takes a screenshot, saves it locally, and then uploads it via FTP to my server using a certain naming system.

    I have included all of the code exactly how it is, except that the real FTP login details, which I have changed to "ftp://usernameassword@address.com". Obviously, I use my real login details here.

    The problem is, the file I am uploading is a fairly hefty bitmap (about 3-4MB). I don't know if this has anything to do with my problem, but basically the issue is that if I try and run the code, sometimes it will outright crash, giving me the normal windows error, sometimes it will work, and (if compiled as an exe) it gives a special error message before crashing. I have included both error messages in the attatch screenshot "Ugh.JPG".

    Can anyone tell me why my program is doing this, and how to stop it? Maybe the file is too large or something? Maybe there's a better way of transferring it? Any ideas?

    Thanks
    Attached Images Attached Images  
    Attached Files Attached Files

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: FTP file upload not working properly

    Bump.

    Anyone? Please? ^_^

  3. #3
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: FTP file upload not working properly

    First of all I would convert the BMP to a JPG using the below API (attached) so the file size is significantly reduced.

    Second there are no login details in your app?

    VB Code:
    1. 'This converts the bmp to jpg
    2. Public Declare Function BmpToJpeg Lib "Bmp2Jpeg.dll" _
    3. (ByVal bmpFileName As String, ByVal JpegFilename As String, ByVal CompressQuality As Integer) As Integer

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: FTP file upload not working properly

    Thanks for the reply,

    I don't really want to convert it to a JPG though - that's why i'm looking to try and make it work: I'd prefer to keep it as a BMP if possible. FTP should be able to transfer 3-4MB without any issues, shouldn't it?

    And yep, I do have login details in the app. I've removed them from this app (the one that i've uploaded) for security reasons.

  5. #5
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: FTP file upload not working properly

    One thing I thought of is to increase the "Timeout" property of your Inet control....

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: FTP file upload not working properly

    Ah don't worry about it, I decided to not bother uploading it onto my website because it's too much hassle.. I'll just keep it as a local version, it'll work then!

    Thanks anyway.

Posting Permissions

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



Click Here to Expand Forum to Full Width