-
-
Save parzibyte/c301e7c68dd17efb270d87778d79f3c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nombreArchivo := renombrarNombreDeArchivoAIdAleatorio(encabezadoPrimerArchivo.Filename) | |
archivoParaGuardar, err := os.Create(filepath.Join(DirectorioArchivos, nombreArchivo)) | |
if err != nil { | |
return | |
} | |
defer archivoParaGuardar.Close() | |
_, err = io.Copy(archivoParaGuardar, primerArchivo) | |
if err != nil { | |
return | |
} | |
io.WriteString(w, "Subido correctamente") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment