Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using the Amazon SDK in Visual Studio. I am trying to upload files to the S3 location using the File.Copy command.

The AWS SDK provides a service to generate a pre-signed URL so that files can be uploaded or downloaded. I have this, but when I try to use it, and error is thrown. "Illegal Character". The last part of the URL is "%2FRFfYsyil%2BTsk%3D".

The code snippet used is:

Dim isrc As String = "C:\Test\Test1.doc"
Dim iDest As String = upldurl & "\Test1.doc"

    File.Copy(isrc, iDest, True)

Catch ex As Exception
    MsgBox("Error occured during upload of file: " & iflnm & vbCrLf & _
           "ERROR: " & ex.ToString)

End Try
Updated 19-Nov-12 2:08am
Vamshi Krishna Naidu 18-Nov-12 19:54pm    
Can you post the code snippet as on where are you getting this error?
KevinBrady57 19-Nov-12 10:51am    
KevinBrady57 20-Nov-12 17:20pm    
I posted the code snippet used as an Improved Question. See above

1 solution

Hi kevin,

I don't think this can be done through File.Copy

The below articles are a very good examples of how files can be uploaded to AWS S3.


Beginning with Amazon S3[^]

uploading an image with aws sdk for net[^]

I know this is not the solution but you can give it a try. I see your code is in VB.Net but these links are in C#. Just a Heads up.

UPDATE: Just found another link for simple File upload Example. Check the third one.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900