Click here to Skip to main content
13,353,106 members (81,237 online)
Rate this:
Please Sign up or sign in to vote.
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
Posted 18-Nov-12 7:20am
Updated 19-Nov-12 3: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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180111.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100