We upload images to Amazon s3 because it serve the uploaded files more efficient content delivery network of Amazon.This article describes on how to upload image file to Amazon s3.
we uploading images to Amazone s3 mainly for speed up the retrieval and also for big storage space..
This article describes how to upload images to Amazone s3 buckets in c#.
Using the code
For uploading to Amazon s3,first Create a Bucket and upload images to your Bucket. Your data is durably stored and backed by the Amazon S3 Service
Name space Using:
Write the code in the upload button click.
AmazonS3 client = AWSClientFactory.CreateAmazonS3Client("Access Key", "Acess secrete key");
var request = new PutObjectRequest();
request.FilePath = filePath;
request.ContentType = file.ContentType;
request.StorageClass = S3StorageClass.Standard;
request.CannedACL = S3CannedACL.BucketOwnerFullControl;
Uploading images to Amazon S3 is uploading is quite simple and reduces the loading time of site.