// ExampleNewUploader_overrideReadSeekerProvider gives an example
// on a custom ReadSeekerWriteToProvider can be provided to Uploader
// to define how parts will be buffered in memory.
ExampleNewUploader_overrideReadSeekerProvider gives an example
on a custom ReadSeekerWriteToProvider can be provided to Uploader
to define how parts will be buffered in memory.
// ExampleNewUploader_overrideReadSeekerProvider gives an example // on a custom ReadSeekerWriteToProvider can be provided to Uploader // to define how parts will be buffered in memory .
func ExampleNewUploader_overrideReadSeekerProvider() {
	cfg, err := config.LoadDefaultConfig()
	if err != nil {
		panic(err)
	}
	uploader := manager.NewUploader(s3.NewFromConfig(cfg), func(u *manager.Uploader) {
		u.BufferProvider = manager.NewBufferedReadSeekerWriteToPool(25 * 1024 * 1024)
	})
	_, err = uploader.Upload(context.Background(), &s3.PutObjectInput{
		Bucket: aws.String("examplebucket"),
		Key:    aws.String("largeobject"),
		Body:   bytes.NewReader([]byte("large_multi_part_upload")),
	})
	if err != nil {
		panic(err)
	}
}
func ExampleNewUploader_overrideReadSeekerProvider ( ) { cfg , err := config . LoadDefaultConfig ( ) if err != nil { panic ( err ) } uploader := manager . NewUploader ( s3 . NewFromConfig ( cfg ) , func ( u * manager . Uploader ) { u . BufferProvider = manager . NewBufferedReadSeekerWriteToPool ( 25 * 1024 * 1024 ) } ) _ , err = uploader . Upload ( context . Background ( ) , & s3 . PutObjectInput { Bucket : aws . String ( " " ) , Key : aws . String ( " " ) , Body : bytes . NewReader ( [ ] byte ( " " ) ) , } ) if err != nil { panic ( err ) } }
ExampleNewUploader_overrideReadSeekerProvider gives an example
on a custom ReadSeekerWriteToProvider can be provided to Uploader
to define how parts will be buffered in memory.
ExampleNewUploader_overrideReadSeekerProvider gives an example on a custom ReadSeekerWriteToProvider can be provided to Uploader to define how parts will be buffered in memory .
// Define a strategy that will buffer 25 MiB in memory