# 22. Virtuoso Functions Guide - xmlStorageSystem.saveMultipleFiles

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## xmlStorageSystem.saveMultipleFiles

Upload a set of files to XML Storage System directory.
structure xmlStorageSystem.saveMultipleFiles (in email string, in password string, in relativepathList array, in fileTextList array);
Description

This method allows users to upload a set of files. The files will be stored in WebDAV repository and will be accessible via HTTP.

Parameters
email – For user identification, this should be a valid email account.
password – The MD5 hash of the password.
relativepathList – Array of strings of target paths relative to the <user home>/blog folder in WebDAV.
fileTextList – An array of strings containing the contents of the files to be uploaded. These must be in the same sequence as the relativepathList. i.e. relativepathList[i] is name for fileTextList[i].
Return Types

This method returns a structure as follows:

        'flError' boolean   		0 success, 1 fault
        'message' string    		fault message (can be used to handle error cases)
        'urllist' array of string 	contains list of URLs corresponding to uploaded files
        'yourUpstreamFolderUrl' string	base URL for upload

Examples
Using the XML Storage System to Save Multiple Files

Simple example of saving a file.

        - Invocation:

        SQL> SOAP_CLIENT (url=>'http://localhost:6666/xmlStorageSystem', operation=>'saveMultipleFiles',
    	parameters=>vector ('email','user@example.domain', 'password', md5('xxx'),
    	  'relativepathList', vector ('test.txt'), 'fileTextList', vector ('this is a test'));

        - SOAP Response

        <saveMultipleFilesResponse>
          <Result>
    	<flError>0</flError>
    	<message />
    	<urllist>
    	  <item>http://localhost:6666/DAV/user@example.domain/blog/test.txt</item>
    	</urllist>
    	<yourUpstreamFolderUrl>http://localhost:6666/DAV/user@example.domain/blog/</yourUpstreamFolderUrl>
          </Result>
        </saveMultipleFilesResponse>

See Also

xmlStorageSystem.registerUser()

xmlStorageSystem.mailPasswordToUser()

xmlStorageSystem.getServerCapabilities()

xmlStorageSystem.deleteMultipleFiles()