Versions in this module Expand all Collapse all v1 v1.1.0 Oct 29, 2026 v1.0.0 Oct 26, 2026 Changes in this version + const MetadataOriginalName + var ErrNotFound = blob.ErrNotFound + var ThumbSizeRegex = regexp.MustCompile(`^(\d+)x(\d+)(t|b|f)?$`) + type BytesReader struct + Bytes []byte + func (r *BytesReader) Open() (io.ReadSeekCloser, error) + type DeleteEvent struct + FileKey string + Filesystem *System + type File struct + Name string + OriginalName string + Reader FileReader + Size int64 + func NewFileFromBytes(b []byte, name string) (*File, error) + func NewFileFromMultipart(mh *multipart.FileHeader) (*File, error) + func NewFileFromPath(path string) (*File, error) + func NewFileFromURL(ctx context.Context, url string) (*File, error) + func (f *File) AsMap() map[string]any + type FileReader interface + Open func() (io.ReadSeekCloser, error) + type MultipartReader struct + Header *multipart.FileHeader + func (r *MultipartReader) Open() (io.ReadSeekCloser, error) + type NewWriterEvent struct + FileKey string + Filesystem *System + Options *blob.WriterOptions + Writer *blob.Writer + type PathReader struct + Path string + func (r *PathReader) Open() (io.ReadSeekCloser, error) + type System struct + func NewLocal(dirPath string) (*System, error) + func NewS3(bucketName string, region string, endpoint string, accessKey string, ...) (*System, error) + func (s *System) Attributes(fileKey string) (*blob.Attributes, error) + func (s *System) Close() error + func (s *System) Copy(srcKey, dstKey string) error + func (s *System) CreateThumb(originalKey, thumbKey, thumbSize string) error + func (s *System) Delete(fileKey string) error + func (s *System) DeletePrefix(prefix string) []error + func (s *System) Exists(fileKey string) (bool, error) + func (s *System) GetFile(fileKey string) (*blob.Reader, error) + func (s *System) GetReader(fileKey string) (*blob.Reader, error) + func (s *System) GetReuploadableFile(fileKey string, preserveName bool) (*File, error) + func (s *System) IsEmptyDir(dir string) bool + func (s *System) List(prefix string) ([]*blob.ListObject, error) + func (s *System) NewWriter(fileKey string, opts *blob.WriterOptions) (*blob.Writer, error) + func (s *System) OnDelete() *hook.Hook[*DeleteEvent] + func (s *System) OnNewWriter() *hook.Hook[*NewWriterEvent] + func (s *System) Serve(res http.ResponseWriter, req *http.Request, fileKey string, name string) error + func (s *System) SetContext(ctx context.Context) + func (s *System) Upload(content []byte, fileKey string) error + func (s *System) UploadFile(file *File, fileKey string) error + func (s *System) UploadMultipart(fh *multipart.FileHeader, fileKey string) error