Page 1 of 1

Ability to overwrite files in an eXist database

Posted: Tue Nov 28, 2006 5:06 pm
by ja2humph
Hello,

I have noticed that when I try to overwrite a resource with a copy on my local machine, I just receive an error message and no option to overwrite the old file.

I then have to find and delete the old file first before I can upload the new version, resulting in a short period of downtime.

This is a fairly frequent task as I tend to work on new versions of a file on a development server and test them before uploading them to the production server.

Any chance this could be looked at for the next release?

Thanks
Julian

Posted: Fri Dec 01, 2006 12:51 pm
by sorin_ristache
Hello,

We will replace the error dialog with a confirmation dialog which asks you to confirm the file overwrite. The overwrite operation is not permitted because the user could overwrite and lose an entire collection by mistake. But for a single file a confirm dialog should be enough as a warning about possibly losing a resource in the database.

Regards,
Sorin

Posted: Fri Dec 01, 2006 1:18 pm
by ja2humph
Thanks sorin. That sounds reasonable.

Just as a sidenote - the eXist Java client overwrites files without any warning at all!

Posted: Fri Dec 01, 2006 2:08 pm
by sorin_ristache
We know that and we considered an implementation error to allow the user to overwrite a resource by mistake without at least a warning. So we decided to signal it as an error and forbid the overwrite. But because in case of an intended overwrite in a collection with very many files it can be difficult to delete the resource first before saving the new version in place of the old one we will replace the error dialog with a confirmation dialog.


Regards,
Sorin

Posted: Thu Dec 21, 2006 5:54 pm
by adrian
Hello,

We have implemented the requested behaviour. When adding resources that already exist in the database, a confirmation dialog will appear to warn you of that, and you will be able to overwrite the files as needed. This modification will probably be available in the next minor version of Oxygen.

Best regards,
Adrian

Posted: Thu Dec 21, 2006 6:02 pm
by ja2humph
Excellent :) Thank you very much

and Merry Christmas!