exception": "java.io.FileNotFoundException", Getting Exception from Network machine.
taufiquealam007 opened this issue · 2 comments
HI,
Tus-java-client is running on Network machine 10.49.9.11:8080 and also REST-API is running on this IP.
Instead of sending file through Postman to REST_API, I am sending only file name. Getting above exception
at line final TusUpload upload = new TusUpload(file);
API end point is
@RequestMapping("uploadDocument")
@CrossOrigin("*")
public Object fileUpload(@RequestPart String fileName) throws IOException, InvalidFormatException, ClassNotFoundException, ProtocolException, ParseException {
final TusUpload upload = new TusUpload(file);
}
When i deploy the API jar to local machine and calling like http://localhost:8090/uploadDocument
then it is working fine. Although Tus-java-client server is running on 10.49.9.11 IP.
public Object fileUpload(@RequestPart String fileName) ---- We cannot use Multipart in place of String.
I want this API to be called from anywhere with oinly file name and then rest of the thing will work by Tus-client (chunking, uploading and resuming).
Bottom Line
How do i send files from local machine (through Postman) to the API which is running on IP.
I do not want to use Multipart.
Ok, I think you have misunderstand what tus-java-client is and what it can and cannot do.
Tus-java-client is running on Network machine 10.49.9.11:8080
tus-java-client is a client library meaning that it is usually not run on a server but instead is should run on the client side (Web app, mobile app, etc). tus-java-client then connects to a server which is listening on some address.
However, as far as I can tell you try to run tus-java-client on the server and are wondering why it is not working as you thought.
Instead of sending file through Postman to REST_API, I am sending only file name.
I want this API to be called from anywhere with oinly file name and then rest of the thing will work by Tus-client (chunking, uploading and resuming).
Are you trying to send a filename to a remote machine and this remote machine is then supposed to read this file solely based on the filename? This is not possible. Since the file is only stored on the client, only the client machine can read this file. The server is not able to read the file by using the filename from the client. This is not related to tus or tus-java-client but those are the basic rules of file accessing.
You mentioned that you don't what to use Multipart. Why is that?
How do i send files from local machine (through Postman) to the API which is running on IP.
I do not want to use Multipart.
Sorry, I cannot help you with Postman as I have never used it before. Please get help for the project itself.
Closing this issue due to inactivity. Feel free to leave a comment if you want to continue the discussion :)