Description of problem: Implement upload and download through the REST interface for documents of type DTD, plain text (.txt), and Open Document Format (odt, ods, odp, etc.). Expected results: Available REST methods for upload and download of source and translated documents of the above formats.
The format (extenstion filename) supported: "odt", "fodt", "odp", "fodp", "ods", "fods", "odg", "fodg", "odb", "odf"
Test will be perform with following command: curl -F type=txt -F file= -F hash=`md5sum document.txt | awk '{print $1}'` -F first=true -F last=true -H "X-Auth-User:USERNAME" -H "X-Auth-Token:API_KEY" "SERVER/rest/file/source/PROJECT_SLUG/VERSION_SLUG?docId=document
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121012-0031)
Soory, this should be reassign as I found: 1. After I click Download as text link, Firefox shows File not found; and 2. The Content-Type of Download as po link is application/octet-stream, which should be text/plain
Added documentation of REST interface methods, see http://github.com/zanata/zanata/wiki/Raw-File-REST-API
VERIFIED with Zanata version 2.1-SNAPSHOT (20121119-1207) and Zanata version 2.0.3-SNAPSHOT (20121119-0019)