scratch – Diff between revs 88 and 90

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 88 Rev 90
Line 62... Line 62...
62 if (!file_exists($userPath)) { 62 if (!file_exists($userPath)) {
63 http_response_code(404); 63 http_response_code(404);
64 die('File not found.'); 64 die('File not found.');
65 } 65 }
Line 66... Line 66...
66   66  
Line -... Line 67...
-   67 $URL = $config['URL_PATH'].$_GET['hash'];
-   68  
67 list($width, $height) = getimagesize($userPath); 69 switch(strtoupper($fileExtension)) {
68   -  
69 $imagePath = $config['URL_PATH'].$_GET['hash']; 70 case 'GIF':
70   71 list($width, $height) = getimagesize($userPath);
71 echo <<<END 72 echo <<<END
72 <html> 73 <html>
73 <head> 74 <head>
74 <meta property="og:site_name" content="Scratch Copy"> 75 <meta property="og:site_name" content="Scratch Copy">
75 <meta property="og:url" content="$imagePath"> 76 <meta property="og:url" content="$URL">
76 <meta property="og:title" content="Scratch Copy"> 77 <meta property="og:title" content="Scratch Copy">
77 <meta property="og:type" content="video.other"> 78 <meta property="og:type" content="video.other">
78 <meta property="og:image" content="$imagePath"> 79 <meta property="og:image" content="$URL">
79 <meta property="og:image:width" content="$width"> 80 <meta property="og:image:width" content="$width">
Line 80... Line 81...
80 <meta property="og:image:height" content="$height"> 81 <meta property="og:image:height" content="$height">
81 </head> 82 </head>
82   83  
83 <body> 84 <body>
84 <p> 85 <p>
Line 85... Line 86...
85 <img src="$imagePath"> 86 <img src="$URL">
86 </p> 87 </p>
-   88 </body>
-   89  
-   90 </html>
-   91 END;
-   92 break;