[Phpwm] Document management - sync web app and file system

Ian Munday ian.munday at illumen.co.uk
Tue Nov 25 10:48:23 UTC 2008


Hi all

I have an existing web app that has some basic document management  
capabilities, allowing users to store documents under 'projects'.

However, rather than managing all these documents solely through a web  
interface, there is a requirement to make this process more efficient  
via a user's desktop.

The solution I'm proposing consists of:

	*	A "Documents" folder on a shared drive which is mapped on all  
users' PCs.
	*	Under the Documents folder there is a folder for each User of the  
web app.
	*	Under each User's folder there is a folder for each of the Projects  
for which they have access permissions.
	*	User's would manage their documents by working within the relevant  
Project folder.

As an example:

	*	There are two users:  User 1, User2
	*	There are three projects:  Project A, Project B, Project C
	*	User 1 has access permissions to Project A and Project B
	*	User 2 has access permissions to Project B and Project C

The folder structure would therefore look like:

     - Documents
         - User 1
             - Project A
             - Project B
         - User 2
             - Project B
             - Project C

Essentially I want to keep the web app in sync with the file system by  
way of a cron job that sweeps the folder structure (say every minute)  
looking for (1) new files that have been added, (2) files that have  
been removed, and (3) files that have been updated (based on modified  
timestamp).  As well as the web app pulling documents from the file  
system, I would also anticipate the web app managing the folder  
structure in line with the users and projects stored in it.

I intend to implement this solution in PHP and have a few  
assumptions / questions:

   1)  I assume it should be fine to get PHP to sweep any folder on a  
local system (assuming permission rights are correct).  I also assume  
that I could use PHP to sweep a remote server (e.g. connection via FTP).

   2)  Is anyone aware of any pitfalls or complications I should be  
wary of?

   3)  Can anyone pull apart my proposed solution, or suggest some  
improvements?

Thanks in advance for your input

Regards,

Ian



More information about the Phpwm mailing list