Documentation
¶
Index ¶
- func ContentOpensInViewer(filename, contentType string) bool
- func Destination(outputPath, filename string) (string, error)
- func IsHEYBlobURL(source string) bool
- func OpensInViewer(filename string) bool
- func PortableFilename(filename string) (string, error)
- func Save(ctx context.Context, downloader Downloader, destination, sourceURL string, ...) (int64, error)
- func SaveBytes(destination string, data []byte, force bool) (int64, error)
- type Downloader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContentOpensInViewer ¶ added in v1.8.1
ContentOpensInViewer reports whether a file called filename whose contents a sniffer named contentType is still a document, image or media file, so an opener that chooses by contents shows it rather than runs it.
func Destination ¶
func IsHEYBlobURL ¶ added in v1.4.3
IsHEYBlobURL reports whether source is a clean relative path to HEY's blob storage.
func OpensInViewer ¶ added in v1.8.1
OpensInViewer reports whether an attachment called filename is a kind of file the system shows in a viewer, so it is safe to open directly. Other attachments can still be saved and opened deliberately.