Hi ,
You can extends MarkLogic REST APIs by creating your custom xquery code file to 
download files.
There you have to  set  xdmp:set-response-content-type("application/pdf") and 
xdmp:add-response-header("Content-Disposition",fn:concat("attachment; 
filename=",<<your pdf file name>>))
and then   just return   fn:doc("<<URI of you pdf file>>")

Regards,Asit Nautiyal
> To: [email protected]
> From: [email protected]
> Date: Fri, 17 Jul 2015 14:49:37 -0400
> Subject: [MarkLogic Dev General] learn to download ingested file
> 
> Hi all,
>    What resources can I use to learn how to allow the user interface to 
> download a file that was ingested into ML?
> 
>    I am breaking apart an email archive, storing the metadata in XML 
> format, and copying attachments to the email messages into a directory. 
> Then, it is all ingested into ML.
> 
>    On my rest-app results I set the attachment file name to display, and 
> now I am looking to make it a link to serve the user the attachment file.
> 
>    Below is an example:
> 
> [message-65] ls -R 18:41:45
> .:
> attachments  message-65.xml
> 
> ./attachments:
> fresh~1.pdf
> 
> 
>    I'm using ML7 and I searched markmail developer list for similar 
> queries, to no avail.
> 
> Thank you
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at: 
> http://developer.marklogic.com/mailman/listinfo/general
                                          
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to