-
Notifications
You must be signed in to change notification settings - Fork 31
Description
feathers-blob
currently relies on a model conforming to the abstract-blob-store interface. Most of the time it appears feathers-blob
is used to store data in cloud object storages, e.g. AWS S3 or Google Cloud Storage, thus relying on e.g. https://github.com/jb55/s3-blob-store or https://github.com/maxogden/google-cloud-storage under-the-hood, which do not seem to be maintained anymore. For instance the S3 module uses https://github.com/nathanpeck/s3-upload-stream as a dependency, which is now deprecated for a long time.
Now most cloud providers provides a similar interface for their Object Storage as Amazon S3 does, we wonder if refactoring feathers-blob
directly using an up-to-date version of the AWS SDK wouldn't be the most relevant.
Moreover, a lot of issues indicate that file uploading/downloading is still a challenging task for most people who have to understand a lot of concepts like blobs, data uris, multipart support, the different client/server responsibilities, etc. In order to simplify this we could also rely on presigned URLs.
At Kalisio we have already started an effort with something able to replace feathers-blob
based on this proposal. It looks like this:
- backend service
- create operation => generates a presigned URL to be used to PUT the object based on a key
- get operation => generates a presigned URL to be used to GET the object based on a key
- upload/download proxy routes to cloud provider in order to avoid CORS problems in constrained environments (required if your client cannot directly access the provider service)
- additional frontend service methods
- upload =>get signed URL and post data to either the proxy or the provider service directly
- download => get signed URL and read data from either the proxy or the provider service directly
Let us know what you think about that, notably if feathers-blob
handles others use cases that would not benefit from this proposal. Otherwise, any help is welcome to upgrade this module.