@app/storage
API module with utilities for file storage. It simplifies the process of working with files in the storage: it provides download links, converts images to different sizes, and so on.
import Storage from '@app/storage'
StorageFile
The StorageFile class and its subclasses provide an object-oriented representation of a file in storage.
- StorageFile - wrapper class for representing a file in storage.
- StorageImageFile - class for representing an image.
- StorageVideoFile - class for representing a video file.
- StorageAudioFile - class for representing an audio file.
Functions
A functional approach to working with files in storage.
- getThumbnailUrl - returns the URL of an image in the desired size by hash.
- getFileTypeFromHash - returns the file type by hash.
- getDurationFromHash - returns the duration of audio or video by hash.
- getAudioInfo - returns information about an audio file.
- getSizesFromHash