Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 28, 2021 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/0e547b5806bb380384ee664de04a437e to your computer and use it in GitHub Desktop.
Save parzibyte/0e547b5806bb380384ee664de04a437e to your computer and use it in GitHub Desktop.
<?php
use Parzibyte\CompartirArchivo;
use Parzibyte\Gestor;
if (!isset($_GET["hash"])) {
exit("No hay hash");
}
include_once "vendor/autoload.php";
$hash = $_GET["hash"];
$detalles = CompartirArchivo::obtenerDetallesPublicosArchivoCompartido($hash);
if (!$detalles) {
exit("El archivo solicitado no existe o se ha dejado de compartir");
}
Gestor::servirArchivoParaDescargar($detalles->id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment