Read User File

Description

Read all of the data in a user file and return it as a block of text. Optionally can access an entry within a zip file. Can return plain text or base64.

The service runs without authority; if a user knows the storage key they are presumed to have authority to read the file.

Input

<ReadUserFile>
<storageKey/> <entry/>
<format>plain|base64</format>
</ReadUserFile>

If entry is passed, the file is presumed to be a zip file, and text from the named entry is returned.

format defaults to plain, to return text. format of base64 returns the binary content of the file as base64. entry cannot be set if base64 is chosen (it might make sense to do this, but we haven't implemented it yet).

Output

<ReadUserFile>
<errorNumber>0</errorNumber> <data/>
</ReadUserFile>

Errors

102 - Not found, which includes storage key not found, file missing for storage key, entry not found, and reading a normal file as a zip file.

103 - Parameter error

Class

com.metrici.xerula.ReadUserFileService