Looking for a way for a website to monitor a file

2019-09-18 17:52发布

问题:

I am developing a website which basically crunches numbers from data files and display statistics. These data files are on the client hard drive and the client can upload them to the server via the HTML upload functionality. This however requires the user to manually upload the files to update the statistics on the website.

I would like to know if there is a possibility for the website to automatically upload these files when they change. I can see the gapping security hole with skipping the user action, but is there a way for an user to share a specific directory from his drive with a website ? I am looking for something very lightweight and easy to configure as the user is not supposed to have any IT knowledge.

I am using Play! framework and the user can be on any OS with any browser.

回答1:

As you are saying yourself, there is no way to do this from a website for security reasons. Services that automatically share folders like, e.g, Dropbox does, do so by installing "real" applications client-side. I'd assume most users still consider this "lightweight" from their perspective, although it means more development work on your end. It also does not require significant IT knowledge.