s3 upload base64 .net core
C#
private static readonly string _awsAccessKey = ConfigurationManager.AppSettings["AWSAccessKey"];
private static readonly string _awsSecretKey = ConfigurationManager.AppSettings["AWSSecretKey"];
private static readonly string _bucketName = ConfigurationManager.AppSettings["Bucketname"];
public ActionResult UploadToS3(string base64String)
{
try
{
IAmazonS3 client;
byte[] bytes = Convert.FromBase64String(base64String);
using (client = Amazon.AWSClientFactory.CreateAmazonS3Client(_awsAccessKey, _awsSecretKey))
{
var request = new PutObjectRequest
{
BucketName = _bucketName,
CannedACL = S3CannedACL.PublicRead,
Key = string.Format("UPLOADS/{0}", file.FileName)
};
using (var ms = new MemoryStream(bytes))
{
request.InputStream = ms;
client.PutObject(request);
}
}
}
catch (Exception ex)
{
}
return View();
}
Also in C#:
- Title
- c# join array
- Category
- C#
- Title
- how to cast list to observablecollection c#
- Category
- C#
- Title
- create char array c#
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- eventos c#
- Category
- C#
- Title
- microsoft.portable.csharp.targets was not found vs 2019
- Category
- C#
- Title
- in unity i want to destroy a gameobject when it hits the edge of the screen
- Category
- C#
- Title
- json serialize object capitalization config
- Category
- C#
- Title
- movement script c#
- Category
- C#
- Title
- C# check many strings quickly
- Category
- C#
- Title
- c# object clone
- Category
- C#
- Title
- unix time c#
- Category
- C#
- Title
- repeater itemdatabound event in c#
- Category
- C#
- Title
- how to store some variables on the device in unity
- Category
- C#
- Title
- instantiate object in circle
- Category
- C#
- Title
- c# md5 hash file
- Category
- C#
- Title
- No IUserTwoFactorTokenProvider<TUser> named 'Default' is registered.'
- Category
- C#
- Title
- call a function c#
- Category
- C#
- Title
- c list add element
- Category
- C#
- Title
- get all child gameObject of gameObject C#
- Category
- C#
- Title
- how to add object in dictionary in c#
- Category
- C#
- Title
- new command - latex
- Category
- C#
- Title
- unity custom update
- Category
- C#
- Title
- check for collision unity c#
- Category
- C#
- Title
- input get button uibutton
- Category
- C#
- Title
- unity variable from another script
- Category
- C#
- Title
- .net core executenonqueryasync transaction
- Category
- C#
- Title
- degree to radians c#
- Category
- C#
- Title
- and unity
- Category
- C#
- Title
- asp net mvc 5 return view from another controller
- Category
- C#
- Title
- wpf label text in center
- Category
- C#
- Title
- if statement conditions c#
- Category
- C#
- Title
- binding c#
- Category
- C#
- Title
- ping with c#
- Category
- C#
- Title
- Unity how to put IEnumerator in update and loop once with yeild return new waitforseconds
- Category
- C#
- Title
- unity string format time
- Category
- C#
- Title
- how to find the area of a circle
- Category
- C#
- Title
- navigate to another page with an object uwp c#
- Category
- C#
- Title
- c# list all files in a directory and subdirectory
- Category
- C#
- Title
- c# catch two exceptions in one block
- Category
- C#
- Title
- c# ref
- Category
- C#
- Title
- .net core copy file in folder to root
- Category
- C#
- Title
- C# for
- Category
- C#
- Title
- functions unity
- Category
- C#
- Title
- random from list c#
- Category
- C#
- Title
- c# find duplicates in list
- Category
- C#
- Title
- void start
- Category
- C#
- Title
- how to make if statement c#
- Category
- C#
- Title
- native-googlesignin configuration is null!?
- Category
- C#
- Title
- eager loading c#
- Category
- C#
- Title
- c# replace string case insensitive
- Category
- C#
- Title
- access object property C#
- Category
- C#
- Title
- c# list.foreach
- Category
- C#
- Title
- unity cycle children
- Category
- C#
- Title
- list with two values c#
- Category
- C#
- Title
- if and c#
- Category
- C#
- Title
- newtonsoft create dynamic object
- Category
- C#
- Title
- How to get the world position of the edge of an object?
- Category
- C#
- Title
- using in c#
- Category
- C#
- Title
- open zip file in c#
- Category
- C#
- Title
- unity how to get transform scale
- Category
- C#
- Title
- get enum value c#
- Category
- C#
- Title
- declare string array c# without size
- Category
- C#
- Title
- copy a list C#
- Category
- C#
- Title
- to list c#
- Category
- C#
- Title
- c# how to run external program with args
- Category
- C#
- Title
- mysql executeScalar only if successful
- Category
- C#
- Title
- c# if statement
- Category
- C#
- Title
- open file in explorer c#
- Category
- C#
- Title
- How to solve error in ExecuteNonQuery() in asp.net
- Category
- C#
- Title
- leantween id
- Category
- C#
- Title
- get random value from list c#
- Category
- C#
- Title
- c# get enum value from string
- Category
- C#
- Title
- set int to null c#
- Category
- C#
- Title
- nunit return parameter
- Category
- C#
- Title
- c# adding to a list
- Category
- C#
- Title
- how to reference the position of a game object unity
- Category
- C#
- Title
- C# invoke
- Category
- C#
- Title
- replace all ponctuation characters c#
- Category
- C#
- Title
- c# properties
- Category
- C#
- Title
- c# split a string and return list
- Category
- C#
- Title
- Move player on planets in unity 2d
- Category
- C#
- Title
- c# convert utc to est
- Category
- C#
- Title
- page parent wpf
- Category
- C#
- Title
- how to compare datetime in c#
- Category
- C#
- Title
- c# change label forecolor code
- Category
- C#
- Title
- c# public static string
- Category
- C#
- Title
- unity ui not seen
- Category
- C#
- Title
- Unity if object doens't exist
- Category
- C#
- Title
- C# .NET Core linq Distinct
- Category
- C#
- Title
- c# warning CS0108
- Category
- C#
- Title
- c# resize bitmap
- Category
- C#
- Title
- how to check if a value is inside an array c#
- Category
- C#
- Title
- countdownevent
- Category
- C#
- Title
- interpolate rotation unity3d
- Category
- C#
- Title
- query associative table ef6
- Category
- C#
- Title
- unity rotate object relative to camera
- Category
- C#
- Title
- hot to move pobject unity
- Category
- C#
- Title
- ASP select box all states
- Category
- C#
- Title
- how to make pressing enter an event in c#
- Category
- C#