I just added more details about the attachment on
http://extensions.xwiki.org/xwiki/bin/view/Extension/XAR+Module+Specifications.

That being said if you are in Java one way to not have to care about
that is to use the XWiki Filter module to parse the XAR since you
don't need a running instance of XWiki to use it.

You can see what the standard XAR parser does with attachments on
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-filter/xwiki-platform-filter-streams/xwiki-platform-filter-stream-xar/src/main/java/org/xwiki/filter/xar/internal/input/AttachmentReader.java#L79.

On Wed, Apr 27, 2016 at 9:57 AM, Jean SIMARD <jean.sim...@xwiki.com> wrote:
> Hi,
>
> It's a Base64 encoding so you should be able to use on Linux any base64
> decoder.  For example, on Linux (I guess on Mac it must be similar), you
> can do
>
> cat your-content.txt | base64 -d
>
> or shorter
>
> base64 -d your-content.txt
>
> I hope this helps,
>
> Sincerely,
>
> On 27/04/2016 08:33, xrichard wrote:
>> Hi,
>>
>> I'm trying to retrieve attachments stored in a XAR export file.
>>
>> According to documentation (see
>> http://extensions.xwiki.org/xwiki/bin/view/Extension/XAR+Module+Specifications)
>> XML node <attachment> contains everything I need to get files content but
>> how is encoded and how to decode the node <content>  ?
>>
>> Thanks for your answers, best regards,
>>
>>
>>
>> --
>> View this message in context: 
>> http://xwiki.475771.n2.nabble.com/What-is-the-format-of-attachments-in-XAR-tp7599233.html
>> Sent from the XWiki- Users mailing list archive at Nabble.com.
>> _______________________________________________
>> users mailing list
>> users@xwiki.org
>> http://lists.xwiki.org/mailman/listinfo/users
>>
>
> --
> Jean Simard
> jean.sim...@xwiki.com
> Research engineer at XWiki SAS
> http://www.xwiki.com
> Committer on the XWiki.org project
> http://www.xwiki.org
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users



-- 
Thomas Mortagne
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to