scratch
/file.php |
---|
@@ -80,12 +80,21 @@ |
#### Store the file. |
$timestamp = atomized_put_contents($userPath.'.'.$fileExtension, $data); |
### Hook for various file extensions. |
$opengraph = FALSE; |
switch(strtoupper($fileExtension)) { |
case 'GIF': |
$opengraph = TRUE; |
break; |
} |
### Return the URL to the file. |
header('Content-Type: text/plain; charset=utf-8'); |
echo json_encode( |
array( |
"hash" => $file, |
"timestamp" => $timestamp |
"timestamp" => $timestamp, |
"opengraph" => $opengraph |
) |
); |
break; |