Skip to content
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

Can I specify bucket custom path for the upload? #574

Closed
anyght opened this issue Nov 22, 2021 · 9 comments
Closed

Can I specify bucket custom path for the upload? #574

anyght opened this issue Nov 22, 2021 · 9 comments
Labels

Comments

@anyght
Copy link

anyght commented Nov 22, 2021

Question
Hello there,
I want to upload an objet to GCS bucket with a specified path, with tusd server connected to my bucket with the command tusd -gcs-bucket=my_bucket.
When I upload an objet, this objet name is a generate value on the bucket.

So I want to get something like My_bucket/custom_path/filename or My_bucket/custom_path/generate_id for the upload filename

How can I specify the name of the upload?

@anyght anyght changed the title Can I specify bucket path for the upload? Can I specify bucket custom path for the upload? Nov 22, 2021
@Acconut
Copy link
Member

Acconut commented Nov 22, 2021

You can control the folder on GCS, in which the upload will be saved using -gcs-object-prefix. The filename will always be generated by tusd and cannot be controlled by you. If you want to have a specific filename on GCS, you must rename/move the object after the upload is complete.

@anyght
Copy link
Author

anyght commented Nov 22, 2021

it is possible to have multiple prefix ?
With -gcs-object-prefix The file path will be static, there is some config to have it dynamic ?

@Acconut
Copy link
Member

Acconut commented Nov 22, 2021

No, the prefix must be specific when starting tusd and cannot be changed at runtime. In addition, there can only be one prefix.

@fbossiere
Copy link

Interesting, thank you. And is there a way to deploy TusD which allows a greater flexibility regarding the prefix or the file naming ? Maybe we have to use another version of TUS ?

@Acconut
Copy link
Member

Acconut commented Nov 22, 2021

If you want fully customized paths, we recommend to use tusd to upload file in one folder and them move/rename them according to your preferences. This way you have the stability of tusd but the flexibility you want.

@sdhull
Copy link

sdhull commented Mar 15, 2022

@Acconut would you be interested in a PR that parameterizes prefix?

@Acconut
Copy link
Member

Acconut commented Mar 17, 2022

We are always interested in PRs :) However, it would make sense to first discussion the actual feature proposal and its implementation in a separate issue.

Akkarine added a commit to Akkarine/tusd that referenced this issue Mar 19, 2022
possibly fix for tus#488
- bumped alpine runtime in dockerfile
- get rid of [unmaintained](bmizerany/pat#17) routing library bmizerany/pat
- fixed CORS request test (status must be just 404, not 405, consequences of bmizerany/pat)
@Acconut
Copy link
Member

Acconut commented Jun 9, 2023

Parameterizing the object key for s3store might be possible in the future using #962, although this is not implemented yet.

@Acconut
Copy link
Member

Acconut commented Sep 18, 2024

This will be implemented in v3 (release date unknown yet) with #1167.

@Acconut Acconut closed this as completed Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants