Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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"
 
Try
    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 6:20am
Edited 19-Nov-12 2:08am
v2
Comments
Vamshi Krishna Naidu at 18-Nov-12 19:54pm
   
Can you post the code snippet as on where are you getting this error?
KevinBrady57 at 19-Nov-12 10:51am
   
Posted.
KevinBrady57 at 20-Nov-12 17:20pm
   
I posted the code snippet used as an Improved Question. See above

1 solution

Rate this: bad
good
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.
 
PHP AWS SDK (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.
  Permalink  
v4

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



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