Find Jobs
Hire Freelancers

Save FileStream Function and Convert FileStream To String

$30-100 USD

En curso
Publicado hace alrededor de 14 años

$30-100 USD

Pagado a la entrega
On deliverables; I have the source code for the project that was started. What I need are 2 routines completed. The first function is called SaveFile. What needs to save to the path specified the Stream. Another routine is a function called ConvertStreamToString. The purpose of this one is I have processes sometimes where I have the stream but it needs to be converted to a String to run functions on it. The sample uses the path C:\[login to view URL] Whatever file extension that is used when recreating the sample needs to be used for the paths for saving (to prove it works). (for example if using .gif; then instead of C:\[login to view URL]; will be C:\[login to view URL] plus C:\[login to view URL] instead of C:\[login to view URL] and C:\[login to view URL] instead of C:\[login to view URL]). If everything is fine; then when running the code; the 3 new files should be exactly the same as the source file. The purpose of the sample instead of just using FileCopy is the data is being uploaded to a server. Both approaches are needed (String representing file and FileStream). ## Deliverables The code I have is here. I have to post it here. Because I am using visual studio 2010 RC edition and I assume that whatever works should be fine for Visual Studio 2008. Module Module1 Sub Main() Dim OldPath As String OldPath = "C:\[login to view URL]" Dim FileString As String = "" Dim FileStream As [login to view URL] Dim ResultsString As String = "" FileString = GetFileString(OldPath) SaveFile("C:\[login to view URL]", FileString) FileStream = GetFileStream(OldPath) SaveFile("C:\[login to view URL]", FileStream) ResultsString = ConvertStreamToString(FileStream) SaveFile("C:\[login to view URL]", ResultsString) End Sub Private Function FixBase64ForImage(ByVal str_Image As String) As String '*** Need to clean up the text in case it got corrupted travelling in an XML file Dim sbText As New [login to view URL](str_Image, [login to view URL]) [login to view URL]("\r\n", [login to view URL]) [login to view URL](" ", [login to view URL]) Return [login to view URL]() End Function Private Function GetFileString(ByVal Path As String) As String Dim byte_Array() As Byte byte_Array = [login to view URL](Path) Return [login to view URL](byte_Array) End Function Private Function GetFileStream(ByVal Path As String) As [login to view URL] Return New [login to view URL](Path, [login to view URL]) End Function Private Function ConvertStreamToString(ByVal Stream As [login to view URL]) As String 'needs to be able to convert the stream to a string (because there are processes where it needs to be a string to work with End Function Private Sub SaveFile(ByVal Path As String, ByVal Stream As [login to view URL]) 'needs to be able to save the stream to the given path End Sub Private Sub SaveFile(ByVal Path As String, ByVal Data As String) If [login to view URL](Path) = True Then [login to view URL](Path) End If Dim byte_Array() As Byte byte_Array = [login to view URL](FixBase64ForImage(Data)) [login to view URL](Path, byte_Array, False) End Sub End Module Needs the source code only. Must work on buyers environment. ## Platform Windows (all versions).
ID del proyecto: 3353523

Información sobre el proyecto

3 propuestas
Proyecto remoto
Activo hace 14 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
See private message.
$17 USD en 1 día
5,0 (66 comentarios)
4,5
4,5
3 freelancers están ofertando un promedio de $34 USD por este trabajo
Avatar del usuario
See private message.
$42,50 USD en 1 día
4,7 (6 comentarios)
3,3
3,3
Avatar del usuario
See private message.
$42,50 USD en 1 día
5,0 (5 comentarios)
2,3
2,3

Sobre este cliente

Bandera de AUSTRALIA
Sydney, Australia
5,0
781
Forma de pago verificada
Miembro desde abr 9, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.