Internal feature to add tags when uploading

This commit is contained in:
Tobias Reich 2014-08-24 17:17:40 +02:00
parent 98f9e6f504
commit 61ae1b3dc3
3 changed files with 4 additions and 3 deletions

View File

@ -101,6 +101,7 @@ upload = {
formData.append("function", "upload");
formData.append("albumID", albumID);
formData.append("tags", "");
formData.append(0, file);
xhr.open("POST", lychee.api_path);

File diff suppressed because one or more lines are too long

View File

@ -202,9 +202,9 @@ class Admin extends Access {
private function upload() {
Module::dependencies(isset($_FILES, $_POST['albumID']));
Module::dependencies(isset($_FILES, $_POST['albumID'], $_POST['tags']));
$photo = new Photo($this->database, $this->plugins, $this->settings, null);
echo $photo->add($_FILES, $_POST['albumID']);
echo $photo->add($_FILES, $_POST['albumID'], '', $_POST['tags']);
}