-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Expected Behaviour
To get the uploaded bytes using the tusFileUploadService.getUploadedBytes(String uploadUrl).
Actual Behaviour
I am uploading using this code in my controller:
@RequestMapping(value = "/api/upload")
//access Cross
@CrossOrigin(origins = "*")
public class TusController {
@Autowired
private TusFileUploadService tusFileUploadService;
@Autowired
HelperService helperService;
@RequestMapping(value = {"", "/**"}, method = {RequestMethod.POST, RequestMethod.PATCH, RequestMethod.HEAD,
RequestMethod.DELETE, RequestMethod.OPTIONS, RequestMethod.GET})
public void processUpload(final HttpServletRequest servletRequest, final HttpServletResponse servletResponse) throws IOException, TusException, InterruptedException {
tusFileUploadService.process(servletRequest, servletResponse);
//access response header Location,Upload-Offset,Upload-length
servletResponse.addHeader("Access-Control-Expose-Headers","Location,Upload-Offset,Upload-Length");
}
@RequestMapping(method = RequestMethod.GET, value = "/getBytesTus")
public String getUploadedBytes() throws TusException, IOException {
System.out.println(tusFileUploadService.getUploadedBytes("/api/upload"));
return "done";
}
}
Here the upload url is "/api/upload" and when I try to get the uploaded bytes using the getUploadedBytes() api which uses the getUploadedBytes with the upload URI I get this error: Method threw 'me.desair.tus.server.exception.UploadNotFoundException' exception.
Metadata
Metadata
Assignees
Labels
No labels