Results 1 to 2 of 2

Thread: FTP picture uploading problems!

  1. #1

    Thread Starter
    Fanatic Member damasterjo's Avatar
    Join Date
    Nov 2005
    Location
    In front of my Comp DirectX7 EXpert
    Posts
    827

    FTP picture uploading problems!

    http://disasterexpertsinc.com/jobs/P...obpics001.html
    at that link you can see a few pictures i am uploading from visual basic. here is my code..

    Code:
    Public Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" _
    (ByVal hFtpSession As Long, ByVal lpszLocalFile As String, _
          ByVal lpszRemoteFile As String, _
          ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
     
    'Put files on the ftp***************************************
            If (FtpPutFile(hConnection, main_path & "\temp\" & folder_names(x) & "\" & picture_names(add), picture_names(add), _
             dwType, 0) = False) Then
                 'ErrorOut Err.LastDllError, "FtpPutFile"
                 Exit Sub
            Else
             
            End If
    '***********************************************************
    so it obviously is putting the picture there. why is it ending up distorted?
    the file size of the pic is 900mb, and 904 (on disk) the ftp uploaded one is 899mb

    PLEASE HELP

    EDIT: PICS DONT SHOW UP AT ALL IN GOOGLE CHROME, AND ONE PIC I PUT MANUALLY THE CORRECT PICTURE TO MAKE SURE THE UPLOADING WAS THE ONLY PROBLEM
    Software languages known:
    Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
    Software API's known:
    Directx 7 and 8
    Internet languages, in the process of learning:
    HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: FTP picture uploading problems!

    make sure ftp mode is set to binary
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

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