<?php $imageFolder = "upload/"; } else { return; } } // header('Access-Control-Allow-Credentials: true'); // header('P3P: CP="There is no P3P policy."'); // Sanitize input return; } // Verify extension if (!in_array(strtolower(pathinfo($temp['name'], PATHINFO_EXTENSION)), array("gif", "jpg", "png"))) { return; } // Accept upload if there was no origin, or if it is an accepted origin $filetowrite = $imageFolder . $temp['name']; // Respond to the successful upload with JSON. // Use a location key to specify the path to the saved image resource. } else { // Notify editor that the upload failed } ?>
I zastanawiam się czy jest możliwość aby zdjęcia te zamykały się w linku i klasie potrzebnej do otwierania ich w lightboxie, ogólnie chciałbym stworzyć taką mini galerię z tych zdjęć.
Czy to w ogóle rozsądne rozwiązanie czy lepiej oddzielić edytor od wrzucania zdjęć? Dodam jeszcze że wykorzystuję to do dodawania posta na bloga.