(Web API) Certain resources should be flagged as a download

Registered by jason.p.pickering on 2013-08-20

In some cases, external files which are DHIS 2 resources, should be downloaded as a download, instead of being returned to the browser. An example of which might be a CSV file, which is produced by some external reporting processed, saved to a URL, and then users could download this CSV file from a resource link. Right now, the CSV file is simply displayed in the browser. Would be good to force the browser to download the file instead.

This only applies to Document.java. We should add a boolean property attachment. A checkbox for "attachment" should be added to the user interface for resources (documents).

Blueprint information

Status:
Complete
Approver:
None
Priority:
Low
Drafter:
jason.p.pickering
Direction:
Approved
Assignee:
Morten Olav Hansen
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2.14
Started by
Morten Olav Hansen on 2013-11-21
Completed by
Morten Olav Hansen on 2013-11-21

Related branches

Sprints

Whiteboard

This can be done with the "attachment" attribute in the content type header.

What resources do you think should be attachments?

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.