-
Notifications
You must be signed in to change notification settings - Fork 65
How to make the uploaded file on the server with corrected file extension? #20
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
Comments
Hi @softboy99, The tus protocol itself makes abstraction of files: "the specification does not have the principle of a disk-based file, allowing you to upload arbitrary data using tus" (https://tus.io/protocols/resumable-upload.html#how-can-i-get-the-file-name-or-file-type-for-an-upload). This means the tus Java server implementation cannot rely on the fact that an upload is always a "file". It could also be for example a video stream. In addition, you should always consider the upload directory as a temporary directory. You should not use it as the permanent destination of the uploaded bytes. However, the Uppy file uploader does provide the filename as metadata. The tus Java server implementation supports this through the For example we could extend the Dropwizard example to
Does this answer your questions? |
Hi |
Hi, |
Hi, The following is my code:
if(ui!=null && !ui.isUploadInProgress()) never be executed |
Hi, |
Hi @softboy99, You need to provide any metadata about the upload (like mime-type, filename, ...) in the For example if you provide the header Also see this unit test. Does this help? |
You can also take a look at this example from another developer: |
How to make the uploaded file on the server with corrected file extension? Currently, the uploaded file on the server has no file extensions. All of them is named "data".
The text was updated successfully, but these errors were encountered: