Hi all friends, Iam facing with one problem I am developing one uploading software for that i have used swing and servlet.Now my problem is i want to give auto selection of file from one folder means user just copy the files from any computer on network and paste it in predefind folder.And when they click on upload button it should start uploading of file one by one and after completion of uploading it move that file into another folder one by one.Now my software doing it perfectly but if user copy and paste any file in that predifined folder from network computer in between uploading then they have to click upload button again after completion of first queue of files(for example if user first copy 10 files and start uploading and in between uploading of that 10 files if user copy another 10 files from network computer then they have to click on upload button again after completion of uploading of first 10 files).But my user requirement is they want to click on upload button once only at the time of starting my application and my application should automatically select the file one by one from folder and send it to destination.Means if they copy the file from network machine in between uploading or any other user from network send file in that predefined folder then my application should select those file automatically which is pasted in between uploading and start uploading. My user don't want to click on upload button again and again when ever they paste file in that folder.Can any one plz guide how I can slove this problem.Below r my codes:-
You could have a deamon thread that scans the upload directory every minute (or 30 seconds, or whatever) and locates files that need to be uploaded. That way, when the user places files in that directory, they will be automatically detected and uploaded.
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Joined: Dec 04, 2001
Hi, Can u plz give me some code for a deamon thread that scans the upload directory every 30 seconds and how i can add it in my code.Eagerly waiting for ur reply. Thanks & Regards Bikash
Refer to the HTTP RFC. The POST (or GET) are action driven. If they select files to move AFTER they start uploading, they will have to upload again. Also, they are able to add more files because you are using an applet. Try to demo this using an HTML form with a file upload element.
"It is almost always answered in the API" - Murali Nanchala