Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    [VB.NET] classe con UPLOAD

    Ho trovato una procedura che esegue il DOWNLOAD tramite FTP, vorrei capire come effettuare l'UPLOAD


    ...

    If UseResume AndAlso ResumeFrom > 0 Then
    SendCommand("REST " + ResumeFrom.ToString)
    If LastResponseType = 4 OrElse LastResponseType = 5 Then
    Disconnect()
    DataSocket.Close()
    Throw New DownloadException("Server doesn't support
    resume.")
    End If
    End If
    'Ask the server to send us the file

    SendCommand("RETR " + RequestedFile)

    'DEVO CAMBIARE IL COMANDO RETR???????????

    If LastResponseType = 4 OrElse LastResponseType = 5 Then
    Disconnect()
    DataSocket.Close()
    Throw New DownloadException("Download request failed.")
    End If
    'Download all the bytes
    DownloadData()


    ....


    dove SendCommand è:

    ...

    Private Sub SendCommand(ByVal Command As String)
    Try
    DownloadSocket.Send(Encoding.ASCII.GetBytes(Comman d &
    ControlChars.CrLf))
    WaitForResponse()
    Catch
    If IsConnected Then Throw New DownloadException("Error while
    writing to command stream.")
    End Try
    End Sub

    ...
    Twister

  2. #2
    Utente di HTML.it L'avatar di darkblOOd
    Registrato dal
    Jul 2001
    Messaggi
    2,212
    penso proprio di si, devi trovare i comandi FTP ed implementarli nel dialogo fra il tuo client ed il server in questione.

    Proprio come fai se realizzi un client di posta che usa i comandi SMTP per inviare/ricevere i msg.

    Ciao

  3. #3
    Azzzzzzzzzz ma come???

    non ne ho la più pallida idea! Credevo bastasse cambiare un comando (tipo GET->PUT)
    Twister

  4. #4

    help

    Potresti dirmi come si esegue il download e se ci sei riuscito l'upload con comandi ftp e VB.NET io non riesco a fare neanche il download... ma non esiste un oggetto tipo inet di vb6??!!

    Grazie

  5. #5
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    58
    Leggi il messaggio di sotto!

  6. #6
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    58
    SCUSAAAAA

    STOR file.ext

    (apriti un client FTP e vedi i comandi no?):metallica

  7. #7
    ?? Scusami ma non ho pacito la risposta

  8. #8
    Utente di HTML.it
    Registrato dal
    Apr 2003
    Messaggi
    58
    Volevo dire che anzichè
    RETR file
    ci andava
    STOR file

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.