Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my application, file editing is done using a shared folder on server. but which is a security risk. is there any other way to edit Microsoft word file.

or is there any way to upload file from downloaded folder or any temp folder from client machine without user interaction using any scripting language/framework


What I have tried:

checked https://dzone.com/articles/upload-files-or-images-to-server-using-nodejs[^] and other on google
Posted
Updated 28-Aug-19 23:09pm
Comments
F-ES Sitecore 29-Aug-19 5:12am    
Would you want a website to upload your files without any user interaction from you?
kedar001 26-Apr-21 5:47am    
Yes

1 solution

Quote:
file editing is done using a shared folder on server. but which is a security risk.
It will be a security risk as long your users can edit the files anonymously. You must try requiring them to login before they can access the resources and suddenly this will be a beautiful feature in your website.

Remember, collaborative software must keep the actual version of the file on the server instead of distributing the files across machines and keeping a track of them individually and keeping them consistent. You have the files on the server, authenticate and authorize the users, and then let them edit it—if you have control over the content of the file you can even verify if a user should be allowed to make a change.

Read here: Collaborative software - Wikipedia[^]
Quote:
or is there any way to upload file from downloaded folder or any temp folder from client machine without user interaction using any scripting language/framework
Yes, and almost every data backup service does this. There are a couple of ways in which you can do that.

Scan the folder and upload every file that you do not have on the backup drives, or use directory watch services and upload the files as they are made available (a bit complex, but recommended approach).

Read here to learn how you can keep an eye on the folder (in your case Downloads) and process the changes in the directory, FileSystemWatcher Class (System.IO) | Microsoft Docs[^]. FileSystemWatcher will only update you on the changes, now it is your responsibility to upload the content, which you can do using Node.js easily.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900