sshnet / sshnet/SSH.NET

Continue Interrupted file uploads

Abierto
#660 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
C#
Estrellas
4.4k
Forks
993
Merge medio
9 d 21 h
PR fusionados (30 d)
1

Descripción

Hi,

I am in a situation where I am uploading large files via SFTP , and sometimes this gets interrupted. The next time I try I want to continue where it stopped. The provided SftpClient.UploadFile functionality did not have that option, so I wrote it using an SftpStream to write to. However the throughput of that was something like 4 to 5 times lower than a call to uploadfile.

So I ended up forking, and added a parameter "continueAbortedTransfer", to the
(Internal)UploadFile function. And a few lines of code at the start of the function to set
the stream positions correctly if the user wants to continue where it stopped the last time.

I have some questions:

  1. Is there an interest in this option, and should I try to prepare a pull request?
  2. Is the best way to add this? I know very little about the internals of this library,
    this was the first location that I found and it is just a couple of lines of code, but
    it could well be that there are better ways to add options like this, or that I broke
    some other code in the process.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza rastreando SftpClient.UploadFile y la implementación interna de UploadFile; después, compárala con el enfoque de SftpStream descrito en el issue. Determina cómo deben reanudarse las transferencias interrumpidas, preservando el comportamiento existente de las subidas y el rendimiento. Se considerará terminado cuando la opción esté claramente definida y las subidas reanudables funcionen de forma fiable.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
csharp
Área
networking
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.