No server
By default, the module provides a storage server that is abstracted by useS3Object composable. In some cases where no server is needed, it can be excluded by setting server config option to false. As a result, the built-in composables and endpoints are no longer available and the Unstorage instance can directly be used.
The drivers of the Unstorage instance are defined on s3 mount point and therefore can be referenced via useStorage('s3').
Note that the drivers can either be
s3 or fs and are configured via driver config option.The s3 driver supports the following methods
getItem/getItemRawTo retrieve KV or Binary data respectively. Note that the internal response headers can be retrieved fromheadersoption.setItem/setItemRawTo upload KV or Binary data respectively. Note that the internal request headers can be extended byheadersoption. OnsetItemRawit's recommended to setContent-LengthandContent-Typeheaders as they may not be automatically resolved by the provider.removeItemTo delete a single Object.clearTo delete multiple Objects.getMetaTo retrieve the user-defined metadata. Note thatsetMetais not supported because metadata can only be set on upload (setItem/setItemRaw) viametaoption.getKeysGets the keys of objects in a specific folder.hasItemChecks if the object exists.