Amazon.S3.Transfer.Internal.MultipartUploadCommand.determineContentType C# (CSharp) 메소드

determineContentType() 개인적인 메소드

private determineContentType ( ) : string
리턴 string
        private string determineContentType()
        {
            if (this._fileTransporterRequest.IsSetContentType())
                return this._fileTransporterRequest.ContentType;

            if (this._fileTransporterRequest.IsSetFilePath() ||
                this._fileTransporterRequest.IsSetKey())
            {
                // Get the extension of the file from the path.
                // Try the key as well.
                string ext = Path.GetExtension(this._fileTransporterRequest.FilePath);
                if (String.IsNullOrEmpty(ext) &&
                    this._fileTransporterRequest.IsSetKey())
                {
                    ext = Path.GetExtension(this._fileTransporterRequest.Key);
                }

                string type = AmazonS3Util.MimeTypeFromExtension(ext);
                return type;
            }

            return null;
        }