func (pl *Plugin) FileReader(path string) (*stream.File, error) { fp, err := os.Open(path) if err != nil { return nil, err } return stream.NewFile(filepath.Base(path), fp), nil }
func (pl *Plugin) FileReader(path string) (*stream.File, error) { bucketName, prefix := splitPath(path) ir, err := pl.s3.Bucket(bucketName).GetReader(prefix) if err != nil { return nil, err } return stream.NewFile(filepath.Base(prefix), ir), nil }