Re: [xwiki-users] Small attachments in DB, big ones in files?

2017-02-10 Thread Mohamed Boussaa
Hello,

XWiki offers the possibility to store your attachments in the database or
directly in the file system.

See more details in this link:
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HAttachmentStorage

Regards,
Mohamed

On Fri, Feb 10, 2017 at 8:34 PM, Lilianne E. Blaze <
lilia...@lilianne-blaze.net> wrote:

> Hello,
> Is it possible to store attachments below a certain size inside a
> database, while storing bigger ones in files?
>
> I assume when using HSQL database it is usually preferred to store
> attachments in files?
>
> Greetings, Lilianne
>


[xwiki-users] Small attachments in DB, big ones in files?

2017-02-10 Thread Lilianne E. Blaze
Hello,
Is it possible to store attachments below a certain size inside a
database, while storing bigger ones in files?

I assume when using HSQL database it is usually preferred to store
attachments in files?

Greetings, Lilianne


[xwiki-users] CKEditor for Inline Mode

2017-02-10 Thread je...@abrightfamily.com
I am combining structured and unstructured data on a single edit sheet. The 
editing mode is accessed by the user from a standard LiveTable actions button. 
The unstructured data is the page content which is included in the edit sheet 
using:

{{html}}$xwiki.getTextArea($tdoc.content){{/html}}

Which I got from this post: 
http://xwiki.475771.n2.nabble.com/Default-editing-mode-for-page-with-object-sheet-td7582541.html#a7582544
 


This all works well enough except that the class properties use CKEditor but 
the textarea uses the wiki editor. I want the users to enter the unstructured 
data using the familiar CKEditor interface and tools. How can I get both the 
unstructured and structured data to use the same editor?

Regards,

Jesse




[xwiki-users] [ANN] XWiki 7.4.6 released

2017-02-10 Thread Ecaterina Moraru (Valica)
The XWiki development team is proud to announce the availability of XWiki
7.4.6.
This is a bugfix release that fixes important bugs discovered in the 7.4.5
version. This release is the last release for the 7.x cycle, since the 7.4
branch reached end of life on January 2017.

You can download it using these links:
JAR:
http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-generic-7.4.6-standard.jar

EXE:
http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-windows-7.4.6.exe

ZIP:
http://download.forge.ow2.org/xwiki/xwiki-enterprise-jetty-hsqldb-7.4.6.zip

WAR:
http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-7.4.6.war

XAR:
http://download.forge.ow2.org/xwiki/xwiki-enterprise-ui-mainwiki-all-7.4.6.xar

Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/Data/XWiki/7.4.6/

Thanks for your support
-The XWiki dev team


Re: [xwiki-users] XWiki 8.4.3 REST - attachments and versioning

2017-02-10 Thread Vincent Massol
Hi Stefan,

> On 10 Feb 2017, at 10:29, Thomas Mortagne  wrote:
> 
> On Fri, Feb 10, 2017 at 8:17 AM, Stefan Helmerichs  
> wrote:
>> Hello,
>> 
>> I am using (as stated) XWiki 8.4.3 on a CentOS7-VM running in a
>> docker-container.
>> 
>> I am using a gradle script to push markdown-files and images to the
>> wiki. The markdown is being wrapped in an xml envelope and pushed to
>> the REST-API, which works nicely. The envelope looks like this:
>> 
>> 
>> http://www.xwiki.org;>
>>  TITLE
>>  markdown/1.2
>>  CONTENT
>> 
>> 
>> TITLE and CONTENT are being replaced with the corresponding items, which
>> are all escaped, so the problem is not with escaping.
>> 
>> We are keeping the files in a structure like the XWiki page-structure,
>> so we have a directory which contains the markdown and its images
>> (corresponding to page, WenHome and attachments) and this contains other
>> directories which in turn.. you get the idea. Basically, every directory
>> is a page, every markdown-file is a WebHome and every other file is
>> an attachment.
>> 
>> Right now I am doing two iterations, one fetches the markdown files and
>> the second fetches all other files.
>> 
>> I am pushing the markdown with XML Content type and the Attachments
>> with BINARY content-type (both from groovyx.net.http.ContentType.*).
>> 
>> Now my problem is that when I upload the attachments, every single
>> attachment adds a new version to the page history. I tried to mitigate
>> this by adding
>> 
>> 1
>> 
>> and
>> 
>> 1.1
>> 
>> to the envelope, but these seem to be unevaluated, as the major version
>> is still increased with every upload.
>> 
>> So my question is: is there a way to:
>> 
>> a) make sure the minor version is upgraded instead of the major version
>> when sending an attachment
> 
> No. Would need to add support for some "majorVersion" parameter in
> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/resources/attachments/AttachmentsResourceImpl.java.
> But hard to make it memory efficient (but yes not a big issue with
> small attachments).

That would be a nice improvement. Would you mind raising a jira issue for this?

Thanks
-Vincent

[snip]



Re: [xwiki-users] XWiki 8.4.3 REST - attachments and versioning

2017-02-10 Thread Thomas Mortagne
On Fri, Feb 10, 2017 at 8:17 AM, Stefan Helmerichs  
wrote:
> Hello,
>
> I am using (as stated) XWiki 8.4.3 on a CentOS7-VM running in a
> docker-container.
>
> I am using a gradle script to push markdown-files and images to the
> wiki. The markdown is being wrapped in an xml envelope and pushed to
> the REST-API, which works nicely. The envelope looks like this:
>
> 
> http://www.xwiki.org;>
>   TITLE
>   markdown/1.2
>   CONTENT
> 
>
> TITLE and CONTENT are being replaced with the corresponding items, which
> are all escaped, so the problem is not with escaping.
>
> We are keeping the files in a structure like the XWiki page-structure,
> so we have a directory which contains the markdown and its images
> (corresponding to page, WenHome and attachments) and this contains other
> directories which in turn.. you get the idea. Basically, every directory
> is a page, every markdown-file is a WebHome and every other file is
> an attachment.
>
> Right now I am doing two iterations, one fetches the markdown files and
> the second fetches all other files.
>
> I am pushing the markdown with XML Content type and the Attachments
> with BINARY content-type (both from groovyx.net.http.ContentType.*).
>
> Now my problem is that when I upload the attachments, every single
> attachment adds a new version to the page history. I tried to mitigate
> this by adding
>
> 1
>
> and
>
> 1.1
>
> to the envelope, but these seem to be unevaluated, as the major version
> is still increased with every upload.
>
> So my question is: is there a way to:
>
> a) make sure the minor version is upgraded instead of the major version
> when sending an attachment

No. Would need to add support for some "majorVersion" parameter in
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/resources/attachments/AttachmentsResourceImpl.java.
But hard to make it memory efficient (but yes not a big issue with
small attachments).

>
> b) replace the history of the page with a single major.minor-version
> history (as is done when importing .xar-files)

Not using standard REST API.

>
> c) upload the page with all its attachments at once, without having to
> change it from markdown to XAR?

No with the current standard REST API. Would need to add an optional
content property in the Page model and add support for it in
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java#L124.

>

The possible alternatives are:
* go trough XAR import REST resource as you probably seen from what I understand
* write a wiki page which act as custom REST service
* write a custom /rest/ resource component in Java



-- 
Thomas Mortagne