2013-07-18 23:53:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// TODO:
|
|
|
|
// * this thing needs to support HEAD and GET requests.
|
|
|
|
//
|
|
|
|
// * the url shall look like: http://whatever/owncloud/index.php/apps/office/ajax/genesis.php/1234
|
|
|
|
// 1234 is the session id here; a database table maps that to a file in storage
|
|
|
|
//
|
|
|
|
// * GET requests have to support ranges
|
|
|
|
// curl --user admin:admin -r 500-1000 -i http://whatever/owncloud/index.php/apps/office/ajax/genesis.php/1234
|
|
|
|
//
|
|
|
|
// hardcoding the served file with /welcome.odt for now is enough to unblock development
|
|
|
|
// (that saves all db work for now)
|
|
|
|
|
2013-07-19 18:52:33 +03:00
|
|
|
namespace OCA\Office;
|
|
|
|
|
2013-07-18 23:53:44 +02:00
|
|
|
// Check if we are a user
|
2013-07-19 18:52:33 +03:00
|
|
|
\OCP\User::checkLoggedIn();
|
2013-07-18 23:53:44 +02:00
|
|
|
|
|
|
|
$filename = "/welcome.odt";
|
|
|
|
|
2013-07-19 18:52:33 +03:00
|
|
|
$download = new Download($filename);
|
|
|
|
$download->sendResponse();
|