-
Notifications
You must be signed in to change notification settings - Fork 214
@tus/gcs-store: allow user to pass bucket instance to GCSStore #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're in beta phase we can still publish breaking changes. Wouldn't you say it might be better to only settle on passing a bucket object so we can remove the projectId and keyFilename options? (I suppose we would have to make GCS a peer dependency then).
btw I'm on holiday till February 22 so I'm only checking up on a couple things but won't really be coding/releasing.
|
That is even better. I did not want to change too much, but just add new functionality in somewhat backward compatible way. Peer dependency is always a good option. Current implementation accepts either a Enjoy your holidays. |
|
I understand. But if we want to do breaking changes, I think now is the time. I find the current combination of options a bit confusing as one options cancels out other options.
Thank you :) |
|
@mitjap what do you think? |
|
This PR should be complete now. But GCS tests need to be fixed before we merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
* main: Bump typescript from 4.9.3 to 5.0.4 (tus#425) Bump sinon from 15.0.0 to 15.0.4 (tus#426) @tus/gcs-store: allow user to pass bucket instance to GCSStore (tus#388) Fix e2e test typecheking (tus#429) Update incorrect comment (tus#430) @tus/s3-store: add missing error code in termination extension (tus#413) @tus/[email protected] @tus/s3-store: fix uncaught exception when cancelling an upload (tus#412) @tus/[email protected] @tus/s3-store: fix uncaught exception when removing files (tus#410) @tus/s3-store: add termination extension (tus#401) @tus/[email protected] Bump @google-cloud/storage from 6.8.0 to 6.9.3 (tus#404) Bump http-cache-semantics from 4.1.0 to 4.1.1 (tus#393) Bump eslint-config-prettier from 8.5.0 to 8.6.0 (tus#392) Bump cookiejar from 2.1.3 to 2.1.4 (tus#383) Bump aws-sdk from 2.1269.0 to 2.1325.0 (tus#403) @tus/server: refactor and improve request validator (tus#402) Fix demo (tus#386)
This will allow users to use already configured Bucket or use all possible options that GCS provides.
In my case I have a service that is responsible for handling all the secrets and create a global
Storageinstance. This way I can reuse that object without repeating any code.As a side note, at the moment GCS does not emit File object on
POST_FINISHevent, so it is not possible to access the remote file without externalBucketinstance.