Skip to content

Instantly share code, notes, and snippets.

View dsentker's full-sized avatar
🎧
No one I think is in my tree; I mean it must be high or low.

Daniel Sentker dsentker

🎧
No one I think is in my tree; I mean it must be high or low.
View GitHub Profile
@dsentker
dsentker / Chunking: server-side
Created April 29, 2019 13:33 — forked from jayarjo/Chunking: server-side
Plupload Examples: Chunking
<?php
if (empty($_FILES) || $_FILES['file']['error']) {
die('{"OK": 0, "info": "Failed to move uploaded file."}');
}
$chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0;
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0;
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : $_FILES["file"]["name"];