In my page downloads, I have lot of liks for files to be downloaded bu the
user like:
HREF="download/file1.zip">Download without jspsmart
And then when the user download a file and update it, he will go back to a
page for uploading that file.
right now everything is working fine, BUT if TWO users downloads the same
file update it and then upload it, in this case the last upload will
overwrite the previous one.
Please could you help me to find out a solution for this problem.
Thanks
-
file download with different name ?? Urgent !! (1 messages)
- Posted by: majid abdel
- Posted on: March 21 2001 13:12 EST
Threaded Messages (1)
- file download with different name ?? Urgent !! by joseph yi on March 23 2001 19:37 EST
-
file download with different name ?? Urgent !![ Go to top ]
- Posted by: joseph yi
- Posted on: March 23 2001 19:37 EST
- in response to majid abdel
i was going to say use some synchronized code, but i think you need to define some business rules about what exactly is supposed to happen. what's the exact procedure you are trying to accomplish? all i can tell is that you don't want a conflict if 2 people download and modify the same file, and upload it one after another effectively deleting the previous person's changes.
anyway, you can also use the java.io.File class of java to determine whether or not the file being uploaded already exists. if it does you can either rename the file that already exists on the server or change the name of the file that is being uploaded. so really, this is up to your business rules.