[Owncloud] Setting the Last Modified Date (Sync/Backup)
Rob Oakes
lyx-devel at oak-tree.us
Tue Jun 19 15:22:46 UTC 2012
Dear ownCloud Developers,
As a quick way of introduction, my name is Rob Oakes. I'm writing for two reasons:
First, I wanted to say thank you for developing a wonderful piece of software. I've just started using ownCloud to manage my business calendar, contacts, and files and I absolutely love it. It meets every need that I have in a well designed and elegant manner, and it is open source. I can't wait to see where it will be headed in the near future.
The second reason I am writing is with a development question. Because I see a great deal of promise in ownCloud, I am very eager to begin adding support for its various features to some of the software products my company develops. As a test case, I wanted to add it to a backup client called "Time Drive" that I develop/maintain (https://launchpad.net/time-drive). In the process of writing an ownCloud specific backend, though, I've come across a problem I can't figure out the solution to:
Whenever I upload files to the web server through a "PUT" command, I find that I am unable to change the "Last-Modified" ('getlastmodified' in WebDav) property. Putting 'Last-Modified' into the header with the proper value is ignored. As is every other header I can think of ('lastmodified', 'getlastmodified', 'setlastmodified', 'Modified-Last', etc.)
I've also tried to change the last-modified time using a PROPPATCH request, also to no avail. Is there someone who might be willing to post a simple HTTP example of how these values can be modified?
By looking at the source code for sync (http://git.csync.org/users/freitag/csync.git/tree/modules/csync_owncloud.c?h=dav, line 1423) and through the archives of the mailing list (http://www.mail-archive.com/owncloud@kde.org/msg01793.html), it seems that ownCloud supports the modification of the 'Last-Modified' property. (This is how the ownCloud csync backend works, right?)
However, even using the properties mentioned in the posts, I am unable to correctly change this value. Because a correct Last-Modified is so important to a backup/sync client, it's something I would like to get working correctly. Uploading an XML manifest file with the correct values might be a workaround, but I would like to avoid it, if I can.
Any help would be greatly appreciated.
Cheers,
Rob Oakes
More information about the Owncloud
mailing list