Allow uploading a file and get the result back without creating an entry

Description

Due to the browser security settings it is impossible to access the filesystem or even the content of individual files selected in the browser provided file upload dialog.
The suggested solution is to provide a REST resource to which it is possible to upload a file via POST that echoes the content of the file directly in the response.

The browser cannot use XHR and do a put, it must be a POST from a regular HTML form, hence the result of the post must be a web-page, not the file directly. The resulting web-page should contain the content of the file inside of a textarea.
(This is similar to when uploading files to an entry, but since this functionality is also used in non-browser settings it supports direct PUT as well as POST with parameters method=put&textarea=true. These parameters are not neccessary in this case since this REST resource is provided solely for the purpose of helping browsers.)

The REST resource should be something like base/echo.

Environment

None

Activity

Show:
Matthias Palmér
May 18, 2016, 11:19 AM

Cleanup of temporary files remove code

Matthias Palmér
May 17, 2016, 12:55 PM

ServletContext null in tomcat container

Hannes Ebner
May 11, 2016, 8:42 PM

Introduced new Echo resource to aid JS-based clients

Fixed

Assignee

Hannes Ebner

Reporter

Matthias Palmér

Labels

None

Components

Fix versions

Priority

Normal