Skip to content

Commit

Permalink
direct link vers l'espace d'echange
Browse files Browse the repository at this point in the history
  • Loading branch information
mathurinpetit committed May 31, 2022
1 parent 0dd16dc commit 59992b0
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/AppBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,24 +119,7 @@ public function instrumentsAction(Request $request){
* @Route("/application", name="application")
*/
public function applicationAction(Request $request){
$publicResourcesFolderPath = $this->get('kernel')->getRootDir() . '/../web/instruments/';
$filename = "omaracuja.apk";
$response = new BinaryFileResponse($publicResourcesFolderPath.$filename);

$mimeTypeGuesser = new FileinfoMimeTypeGuesser();

if($mimeTypeGuesser->isSupported()){
$response->headers->set('Content-Type', $mimeTypeGuesser->guess($publicResourcesFolderPath.$filename));
}else{
$response->headers->set('Content-Type', 'text/plain');
}

$response->setContentDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
$filename
);

return $response;
return $this->redirect("https://url-a-changer.com");
}


Expand Down

0 comments on commit 59992b0

Please sign in to comment.