Last post Feb 21, 2012 03:45 AM by Hua-Jun Li - MSFT
Feb 19, 2012 09:12 PM|Christos83|LINK
I have a problem in uploading files to an amazon s3 account.
I found the follow link
and I solved my problem (the part of uploading) but I have the following problem:
I made a web form with an FileUpload control and a button, which when will be clicked it runs at the server side the following code
protected void Upload_Click(object sender, EventArgs e)
string path = Path.GetFullPath(FileUpload1.PostedFile.FileName);
string s3key = FileUpload1.FileName;
PutObjectRequest request = new PutObjectRequest();
My main problem is that I can't get the full path of the file, that I want to upload. Despite, I have used the below method:
I can't get the full path of the file. When I hardcode the full path, it uploads the file!
Having searching a lot, I found that there are two conflicting options for that problem.
The first is that this is impossible. For security reasons, you cannot get the full path.
Thank's a lot for any help in advance.
Feb 21, 2012 03:45 AM|Hua-Jun Li - MSFT|LINK
This actually gives you path of the uploaded file.
But in all the newer browsers (FF 3.6 series, Chrome, IE7+) this feature has been disabled due to security reasons. Any website should not need path of a file stored in client's systems because that gives the directory structure and may expose other important
things to website owner.
So in your case, the above code returned only the file name.