ARTICLE AD BOX
I am trying to transfer files from a network drive to an AWS S3 subfolder. In the debug mode, When the code reaches the line where UploadDirectoryAsync is called, it appears to run as if the files are being uploaded successfully, and no errors are thrown.
However, when I check the S3 bucket, I do not see any files in the destination subfolder.
Below is the code I am using. Could someone let me know if I might be missing something or if there is anything I should check?
public async Task BulkUpload() { try { var S3client = new AmazonS3Client(_configuration["AwsAccesKey"].ToString(), _configuration["AwsSecretKey"].ToString(), RegionEndpoint.USWest2); var directoryTransferUtility = new TransferUtility(S3client); var request = new TransferUtilityUploadDirectoryRequest { BucketName = _configuration["AwsBucketName"].ToString() + @"/" + "SubFiles", Directory = @"\\TestFileserver\FileR\", SearchOption = SearchOption.AllDirectories, SearchPattern = "*.*" }; await directoryTransferUtility.UploadDirectoryAsync(request); } catch (Exception ex) { } }8071 gold badge7 silver badges31 bronze badges
1
Explore related questions
See similar questions with these tags.
