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

Two files same filename #406

Closed
MichalKrakow opened this issue Aug 28, 2022 · 4 comments
Closed

Two files same filename #406

MichalKrakow opened this issue Aug 28, 2022 · 4 comments
Labels

Comments

@MichalKrakow
Copy link

Describe the bug
It's probably documentation issue cause i find it hard to belive this is not yet addressed.
When uploading same file, or event different file with the same filename, server does not provide any obvious way to address the issue and increment filename with some suffix. TUS specification say, the file location is being estabilished with first response to client so at this point we should have some way to check if file does not exist in storage already and change the incoming file destination filename. It should be event automatically resolved by server with some way to override by configuration.

To Reproduce
Steps to reproduce the behavior:

  1. uload file test.jpg
  2. uload different file test.jpg from another client
  3. in storage you find only first one...

Expected behavior
File with suffix should be stored in storage

So if this feature is already in place, please make it stand out in documentation since lack of it makes this library useless.

@ankitpokhrel
Copy link
Owner

Hi @MichalKrakow, you need to organize your uploads in the server to prevent that from happening. See #79 and #52.

@MichalKrakow
Copy link
Author

Thanks for taking Your time to response ❤️

So to wrap it up for future users lets say:
YOU DONT CHANGE YOUR FILENAME ON UPLOAD, YOU CHANGE ITS LOCATION IN STORAGE
and that's by design so either you roll with this storage design, or you can change it after upload is done by adopting 'tus-server.upload.complete' event.

Thanks, its clear to me now - but still documentation should point it out, especially considering that default configuration without this piece of code will introduce bugs to this library users code logic.

Best regards,
Thank so much!

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

@github-actions
Copy link

Closing because of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants