/// <summary> /// Uploads the files in directory. The object key is obtained from the file names /// inside the directory. /// For large uploads, the file will be divided and uploaded in parts using /// Amazon S3's multipart API. The parts will be reassembled as one object in /// Amazon S3. /// </summary> /// <param name="request"> /// The request that contains all the parameters to upload a directory. /// </param> public void UploadDirectory(TransferUtilityUploadDirectoryRequest request) { if (!request.IsSetDirectory()) { throw new ArgumentNullException("directory"); } if (!request.IsSetBucketName()) { throw new ArgumentNullException("bucketName"); } if (!Directory.Exists(request.Directory)) { throw new ArgumentException(string.Format("The directory {0} does not exists!", request.Directory), "directory"); } UploadDirectoryCommand command = new UploadDirectoryCommand(this, request); command.Execute(); }
/// <summary> /// Uploads the files in directory. The object key is obtained from the file names /// inside the directory. /// For large uploads, the file will be divided and uploaded in parts using /// Amazon S3's multipart API. The parts will be reassembled as one object in /// Amazon S3. /// </summary> /// <param name="request"> /// The request that contains all the parameters to upload a directory. /// </param> public void UploadDirectory(TransferUtilityUploadDirectoryRequest request) { validate(request); UploadDirectoryCommand command = new UploadDirectoryCommand(this, request); command.Execute(); }
private void UploadDirectoryHelper(TransferUtilityUploadDirectoryRequest request) { validate(request); UploadDirectoryCommand command = new UploadDirectoryCommand(this, this._config, request); command.Execute(); }