Skip to content

Commit 93fc49e

Browse files
committed
Abstract storage backed. FileSystem based backend also provided.
1 parent a6a8782 commit 93fc49e

5 files changed

Lines changed: 536 additions & 409 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "library",
44
"description": "",
55
"require": {
6-
"php": "^7.1",
6+
"php": "^7.3",
77
"psr/http-message": "*",
88
"ext-json": "*",
99
"ext-curl": "*"

examples/server.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<?php
2+
3+
use ThunderTUS\Store\FileSystem;
4+
25
include "vendor/autoload.php";
36

47
/*
@@ -9,8 +12,9 @@
912
$request = Zend\Diactoros\ServerRequestFactory::fromGlobals();
1013
$response = new Zend\Diactoros\Response();
1114

15+
$backend = new FileSystem(__DIR__ . DIRECTORY_SEPARATOR . "uploads");
1216
$server = new ThunderTUS\Server($request, $response);
13-
$server->setUploadDir(__DIR__ . DIRECTORY_SEPARATOR . "uploads");
17+
$server->setStorageBackend($backend);
1418
$server->setApiPath("/");
1519
$server->handle();
1620
$response = $server->getResponse();

0 commit comments

Comments
 (0)