Bug 864277 - [RFE] Allow upload and download of txt, dtd and open document format through REST interface
Summary: [RFE] Allow upload and download of txt, dtd and open document format through ...
Alias: None
Product: Zanata
Classification: Retired
Component: ProjectType-Docs
Version: development
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 2.0
Assignee: David Mason
QA Contact: Ding-Yi Chen
Depends On: 886711
Blocks: 864280 884347
TreeView+ depends on / blocked
Reported: 2012-10-09 03:26 UTC by David Mason
Modified: 2013-02-26 03:46 UTC (History)
2 users (show)

Fixed In Version: 2.0.3-SNAPSHOT (20121119-0019)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-26 03:46:17 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 864275 None None None Never
Red Hat Bugzilla 864280 None None None Never

Internal Links: 864275 864280

Description David Mason 2012-10-09 03:26:16 UTC
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.

Comment 1 Ding-Yi Chen 2012-10-11 03:51:47 UTC
The format (extenstion filename) supported:
"odt", "fodt", "odp", "fodp", "ods", "fods", "odg", "fodg", "odb", "odf"

Comment 2 Ding-Yi Chen 2012-10-11 04:15:30 UTC
Test will be perform with following command:

curl -F type=txt -F file=@document.txt -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

Comment 3 Ding-Yi Chen 2012-10-15 03:57:29 UTC
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20121012-0031)

Comment 4 Ding-Yi Chen 2012-10-15 04:53:33 UTC
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

Comment 5 David Mason 2012-10-17 05:53:11 UTC
Added documentation of REST interface methods, see http://github.com/zanata/zanata/wiki/Raw-File-REST-API

Comment 6 Ding-Yi Chen 2012-11-19 05:10:17 UTC
with Zanata version 2.1-SNAPSHOT (20121119-1207) 
and Zanata version 2.0.3-SNAPSHOT (20121119-0019)

Note You need to log in before you can comment on or make changes to this bug.