Re: Open, edit & save document via browser

From: Date: Fri, 23 Jan 2015 16:05:54 +0000
Subject: Re: Open, edit & save document via browser
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-324287@lists.php.net to get a copy of this message
On 23/01/2015 15:47, Stuart Dallas wrote: > On Friday, Jan 23, 2015 at 2:41 pm, Adrian Walls <awalls@23sparks.com>, wrote: > > > Sorry, perhaps I should have explained in a little more detail in my original email. > > > Basically users can create templates in the system using docx documents. These templates can > be populated defined place holders and when they generate a document in some content from the system > the place holder values will get replaced with actual values. The generated document is > automatically stored within a documents repository in their account. Users may want to edit these > generated documents to make small amendments to them. Currently they have to download the document > to their local machine, make the changes and upload it back again which results in them having two > versions of the same document (unless the delete the previous version). To make this easier for > users I wanted to see if there was some mechanism so when they open the document for editing on > their local machine that this could be saved directly back to the server overwriting the original > document. > > > I don't want to insist that users have a subscription to Office 365 etc in order to use > this feature in the system as many have a version of MS Office or OpenOffice already installed > locally on their machine. > > Other than the Dropbox-style approach the only other way I can think of right now is to > implement a Java applet that downloads the file and opens it locally, then watches it for changes > and uploads it as necessary. Not a very clean solution. > > > > > -Stuart Hi, This is exactly the problem. Web browsers are isolated from the local file system for security reasons. Rather than use dropbox, you could set up an OwnCloud server [http://owncloud.org/] which is the open source equivalent. You can then watch for changes to files using the php function inotify_add_watch [http://php.net/manual/en/function.inotify-add-watch.php]. When a modified file is found you could then trigger the upload to AWS. Ian --

« previous php.general (#324287) next »