1
UIからEDUPUB/Zipファイルをアップロードします。 EDUPUB/Zipファイルを取り込んでMarkLogicデータベースに取り込むために、REST API拡張モジュールを実装したいと考えています。 MarkLogic API APIはこれをサポートしていますか?助言がありますか?Rest API拡張モジュールを通じてmarklogicデータベースにEDUPUB(Zipファイルなど)を挿入できます
私は
xquery version "1.0-ml";
declare namespace zip="xdmp:zip";
declare function local:epubupload ($filepath as xs:string)
{
let $get_document :=xdmp:document-get($filepath)
let $get_uri := fn:document-uri($get_document)
let $get_document_uri := fn:concat($get_uri, "/")
let $get_collection := fn:tokenize($get_uri, "\\")[last()]
let $epub_extract := xdmp:zip-manifest($get_document)
for $each_file in $epub_extract/zip:part/text()
let $document_data := xdmp:zip-get($get_document, $each_file)
let $full_document_uri := fn:concat($get_document_uri, $each_file)
return xdmp:document-insert($full_document_uri, $document_data,(), $get_collection)
};
local:epubupload("c:\data\sample.epub")
EDUPUB/Zipファイルを解凍し、アップロードするための以下のコードを実装しかし、パラメータが何であるかをREST APIの?ユーザーシステムからファイル全体を取得する方法は?
あなたの提案に感謝します。 – Raj