[xwiki-users] File-based store for attachments?
Hi! Is there a way to use file-based store for attachments? I have low memory server and can't use current DB implementation.
There is currently an implementation in the works. You can find it here: http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-store/xwiki-store-f... Unfortunately there is no .jar file so you would have to compile it yourself and support for filesystem based attachment history storage is currently nonexistant. If you are interested, the process is you install maven and compile the jar file then drop the jar into your /WEB-INF/lib directory and change the line in xwiki.cfg which says: # xwiki.store.attachment.hint=default and make it say xwiki.store.attachment.hint=file This is of course alpha but I have used it and it should work fine. Also to prevent the attachments being saved in the database by the versioning store change: # xwiki.store.attachment.versioning.hint=default to xwiki.store.attachment.versioning.hint=void This will however prevent you having a version history for attachments. Caleb On 12/16/2010 03:37 AM, Donnie Lee wrote:
Hi!
Is there a way to use file-based store for attachments? I have low memory server and can't use current DB implementation. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Caleb! Thanks for the link, but unfortunately I don't know how to build it. I downloaded it via SVN and run Maven, and got error: [ERROR] Non-resolvable parent POM: Could not find artifact org.xwiki.platform:xwiki-core-parent:pom:2.7-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 27, column 11 -> [Help 2] On Thu, Dec 16, 2010 at 2:34 PM, Caleb James DeLisle <[email protected]> wrote:
There is currently an implementation in the works. You can find it here: http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-store/xwiki-store-f...
If you are really interested (keep in mind, this _is_ alpha) The I could build you a copy, do a couple quick tests on it and upload it somewhere. It would be very cool to get real user feedback on this before it's released. Caleb On 12/17/2010 02:49 AM, Donnie Lee wrote:
Hi Caleb!
Thanks for the link, but unfortunately I don't know how to build it. I downloaded it via SVN and run Maven, and got error: [ERROR] Non-resolvable parent POM: Could not find artifact org.xwiki.platform:xwiki-core-parent:pom:2.7-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 27, column 11 -> [Help 2]
On Thu, Dec 16, 2010 at 2:34 PM, Caleb James DeLisle <[email protected]> wrote:
There is currently an implementation in the works. You can find it here: http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-store/xwiki-store-f...
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi, On Fri, Dec 17, 2010 at 08:49, Donnie Lee <[email protected]> wrote:
Hi Caleb!
Thanks for the link, but unfortunately I don't know how to build it. I downloaded it via SVN and run Maven, and got error: [ERROR] Non-resolvable parent POM: Could not find artifact org.xwiki.platform:xwiki-core-parent:pom:2.7-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 27, column 11 -> [Help 2]
You need to setup maven with XWiki repositories, see http://dev.xwiki.org/xwiki/bin/view/Community/Building
On Thu, Dec 16, 2010 at 2:34 PM, Caleb James DeLisle <[email protected]> wrote:
There is currently an implementation in the works. You can find it here: http://svn.xwiki.org/svnroot/xwiki/contrib/sandbox/xwiki-store/xwiki-store-f...
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Thomas Mortagne
Hi!, Thanks for this link, but unfortunately I got another build error. Caleb, could you please make a JAR for me? I use XWiki 2.6.33065, if the version is important. Thanks in advance.
You need to setup maven with XWiki repositories, see http://dev.xwiki.org/xwiki/bin/view/Community/Building
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier. http://www.xwiki.org/xwiki/bin/download/XWiki/Caleb_James_DeLisle/xwiki%2Dst... Attachments which you upload after making this change will be stored on the filesystem (on my computer, they are stored in /var/log/tomcat5.5/work/ in a directory which is created called "storage") If you decide to change back to the old storage, the new attachments will all suddenly become empty. Do not delete anything in that directory manually or add anything, especially not symlinks which would confuse recursive delete code with bad results. There is an occasional problem where an attempt to delete an attachment waits forever. This is because some misbehaving thread has acquired the lock on the attachment file and refuses to let it go. I found that when it occurs, it can be easily fixed by viewing the attachment then trying to delete again. Lock forcing is on my todo list. Please back up your system if there is anything of value, this code has not yet seen any use on a live server. Thanks a lot for testing, I hope you can provide some early feedback. Caleb On 12/17/2010 04:52 AM, Donnie Lee wrote:
Hi!,
Thanks for this link, but unfortunately I got another build error. Caleb, could you please make a JAR for me? I use XWiki 2.6.33065, if the version is important. Thanks in advance.
You need to setup maven with XWiki repositories, see http://dev.xwiki.org/xwiki/bin/view/Community/Building
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Caleb! Thanks. I copied it in lib, altered the xwiki config and got very long path for file storage. For example, I uploaded retro.pdf file at Sandbox page (Xwiki Centos 5 installation), path is: /var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro.pdf Why to use "~this" in file path and folder "retro.pdf"? What do you think, is /var/cache the right place for attachments? Also, I have no success with file deletion. If I delete file folder directly from attachments folder, then it still exists on page and I can't remove it from page. If I delete it from web, it don't deleting at filesystem and still exists on webpage. On Fri, Dec 17, 2010 at 1:39 PM, Caleb James DeLisle <[email protected]> wrote:
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier.
Hi Denis, On Mon, Dec 20, 2010 at 14:38, Donnie Lee <[email protected]> wrote:
Hi Caleb!
Thanks. I copied it in lib, altered the xwiki config and got very long path for file storage. For example, I uploaded retro.pdf file at Sandbox page (Xwiki Centos 5 installation), path is:
/var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro.pdf
Why to use "~this" in file path and folder "retro.pdf"? What do you think, is /var/cache the right place for attachments?
Caleb explained his rationale for this on item 2. here: http://markmail.org/message/pl7v4sew2ujksrvv Hope this helps, Guillaume
Also, I have no success with file deletion. If I delete file folder directly from attachments folder, then it still exists on page and I can't remove it from page. If I delete it from web, it don't deleting at filesystem and still exists on webpage.
On Fri, Dec 17, 2010 at 1:39 PM, Caleb James DeLisle <[email protected]> wrote:
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier.
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
s/Denis/Donnie , sorry about that. Guillaume On Tue, Dec 21, 2010 at 10:22, Guillaume Lerouge <[email protected]>wrote:
Hi Denis,
On Mon, Dec 20, 2010 at 14:38, Donnie Lee <[email protected]> wrote:
Hi Caleb!
Thanks. I copied it in lib, altered the xwiki config and got very long path for file storage. For example, I uploaded retro.pdf file at Sandbox page (Xwiki Centos 5 installation), path is:
/var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro.pdf
Why to use "~this" in file path and folder "retro.pdf"? What do you think, is /var/cache the right place for attachments?
Caleb explained his rationale for this on item 2. here: http://markmail.org/message/pl7v4sew2ujksrvv
Hope this helps,
Guillaume
Also, I have no success with file deletion. If I delete file folder directly from attachments folder, then it still exists on page and I can't remove it from page. If I delete it from web, it don't deleting at filesystem and still exists on webpage.
On Fri, Dec 17, 2010 at 1:39 PM, Caleb James DeLisle <[email protected]> wrote:
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier.
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Dec 21, 2010, at 10:22 AM, Guillaume Lerouge wrote:
Hi Denis,
On Mon, Dec 20, 2010 at 14:38, Donnie Lee <[email protected]> wrote:
Hi Caleb!
Thanks. I copied it in lib, altered the xwiki config and got very long path for file storage. For example, I uploaded retro.pdf file at Sandbox page (Xwiki Centos 5 installation), path is:
/var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro.pdf
Why to use "~this" in file path and folder "retro.pdf"? What do you think, is /var/cache the right place for attachments?
Caleb explained his rationale for this on item 2. here: http://markmail.org/message/pl7v4sew2ujksrvv
Personally I have a hard time with it too and I think everyone who uses this will ask this question since it's far from obvious. I wish we could find a better naming scheme. The only issue is nested spaces and for example we could decide that spaces are aggegreated as a single path element: ..../<space or nested spaces here>/attachments/... Or we could decide to use a system like REST to indicate what each part of the path means Or we could have a special treatment when there's a space called "attachments" like rename it to ~attachments for ex, etc Or... Thanks -Vincent
Hope this helps,
Guillaume
Also, I have no success with file deletion. If I delete file folder directly from attachments folder, then it still exists on page and I can't remove it from page. If I delete it from web, it don't deleting at filesystem and still exists on webpage.
On Fri, Dec 17, 2010 at 1:39 PM, Caleb James DeLisle <[email protected]> wrote:
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier.
Hello Donnie, Sorry for not getting back sooner, the "~this" and "/retro.pdf/" each have a reason for existing. "~this" exists because there is talk about eventually allowing nested spaces and if you created a space called TestPage1 and inside of it created a document called "attachments" then we would have a problem. The "/retro.pdf/" is for supporting versioning which is not (quite) written yet. retro.pdf version 1.1 will be: /var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro~v1.1.pdf and 1.2 will be /var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro~v1.2.pdf On 12/21/2010 04:22 AM, Guillaume Lerouge wrote:
Hi Denis,
On Mon, Dec 20, 2010 at 14:38, Donnie Lee <[email protected]> wrote:
Hi Caleb!
Thanks. I copied it in lib, altered the xwiki config and got very long path for file storage. For example, I uploaded retro.pdf file at Sandbox page (Xwiki Centos 5 installation), path is:
/var/cache/tomcat5/work/storage/xwiki/Sandbox/TestPage1/~this/attachments/retro.pdf/retro.pdf
Why to use "~this" in file path and folder "retro.pdf"? What do you think, is /var/cache the right place for attachments?
Caleb explained his rationale for this on item 2. here: http://markmail.org/message/pl7v4sew2ujksrvv
Hope this helps,
Guillaume
Also, I have no success with file deletion. If I delete file folder directly from attachments folder, then it still exists on page and I can't remove it from page.
This is the wrong way to do it and probably will not ever be supported.
If I delete it from web, it don't deleting at filesystem and still exists on webpage.
Does it say "deleting attachment" at the bottom of the screen and never stop? This is a problem which I have encountered some times. It is because a greedy thread is refusing to give up the lock and I have to implement lock forcing before this becomes mainstream. Caleb
On Fri, Dec 17, 2010 at 1:39 PM, Caleb James DeLisle <[email protected]> wrote:
Here is a copy of the .jar file. You put that file in your /WEB-INF/lib directory (don't worry about the 2.7 in the name it should be compatible) and change your xwiki.cfg file as described earlier.
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (5)
-
Caleb James DeLisle -
Donnie Lee -
Guillaume Lerouge -
Thomas Mortagne -
Vincent Massol