Closed softboy99 closed 5 years ago
Hi,
I faced the similar issue, you can handle this with the regular expression like this
/.*/upload/[a-z_A-Z]*/[0-9]+/?
The /.*
shall mask the context-path of the spring. The /?
is required for UUID (fileid) extraction.
Hi @softboy99,
You should try to pass in the Spring context path when configuring the TusFileUploadService. Here you can find an example of this: https://github.com/tomdesair/tus-java-server-spring-demo/blob/master/spring-boot-rest/src/main/java/me/desair/spring/tus/App.java#L43
Alternatively, you can also try to write an upload URI regex that matches your situation, for example .withUploadURI("/.*/api/upload")
.
Does this solve your problem?
I'm closing this issue as I assume that the above answers solved your problem.
Many Thanks ! It solved the problem.
i checked the source code, the uploadUriPattern in PostURIValidator doesn't consider context-path of spring