func UploadFile(fileName string, fileBytes *bytes.Buffer, s3uploader *s3manager.Uploader) (string, error) {
	class := s3.ObjectStorageClassReducedRedundancy
	contentType := "image/jpeg"

	// Upload the file to S3 using the S3 Manager
	uploadRes, err := s3uploader.Upload(&s3manager.UploadInput{
		Bucket:       aws.String(config.Opts.S3Bucket),
		Key:          aws.String(path.Join(config.Opts.S3Prefix, fileName)),
		Body:         fileBytes,
		ContentType:  &contentType,
		StorageClass: &class,
	})
	if err != nil {
		return "", err
	}

	return uploadRes.Location, nil
}
// UploadFile sends the give image bytes to Amazon S3.
UploadFile sends the give image bytes to Amazon S3.
// UploadFile sends the give image bytes to Amazon S3 .
func UploadFile(fileName string, fileBytes *bytes.Buffer, s3uploader *s3manager.Uploader) (string, error) {
	class := s3.ObjectStorageClassReducedRedundancy
	contentType := "image/jpeg"
	uploadRes, err := s3uploader.Upload(&s3manager.UploadInput{
		Bucket:       aws.String(config.Opts.S3Bucket),
		Key:          aws.String(path.Join(config.Opts.S3Prefix, fileName)),
		Body:         fileBytes,
		ContentType:  &contentType,
		StorageClass: &class,
	})
	if err != nil {
		return "", err
	}
	return uploadRes.Location, nil
}
func UploadFile ( fileName string , fileBytes * bytes . Buffer , s3uploader * s3manager . Uploader ) ( string , error ) { class := s3 . ObjectStorageClassReducedRedundancy contentType := " " uploadRes , err := s3uploader . Upload ( & s3manager . UploadInput { Bucket : aws . String ( config . Opts . S3Bucket ) , Key : aws . String ( path . Join ( config . Opts . S3Prefix , fileName ) ) , Body : fileBytes , ContentType : & contentType , StorageClass : & class , } ) if err != nil { return " " , err } return uploadRes . Location , nil }
UploadFile sends the give image bytes to Amazon S3.
UploadFile sends the give image bytes to Amazon S3 .
// Upload the file to S3 using the S3 Manager