From 8f369db93c54796e89ddce7a5cf242ad0f02a4e0 Mon Sep 17 00:00:00 2001 From: David Guillot Date: Sun, 11 Dec 2016 21:31:29 +0100 Subject: [PATCH] [html5_uploader] Fixed input used for upload `input()->type('file')` doesn't make Forge add the `enctype="multipart/form-data"` attribute required to transfer files through a web form. With `upload()` it works ;) --- 3.0/modules/html5_uploader/controllers/uploader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/modules/html5_uploader/controllers/uploader.php b/3.0/modules/html5_uploader/controllers/uploader.php index 608e7b85..aebb22e6 100644 --- a/3.0/modules/html5_uploader/controllers/uploader.php +++ b/3.0/modules/html5_uploader/controllers/uploader.php @@ -112,7 +112,7 @@ private function _get_add_form($album) { $form = new Forge("uploader/add/{$album->id}", "", "post", array("id" => "g-add-photos-form")); $group = $form->group("add_photos") ->label(t("Add photos to %album_title", array("album_title" => html::purify($album->title)))); - $group->input("files[]")->type("file")->multiple(); + $group->upload("files[]")->multiple(); $form->input("FOO")->type("hidden")->label(sprintf("You may upload several files at once. Uploading pictures may take some time - please be patient. Max. upload size of all pictures: %.0f MB.", ini_get("upload_max_filesize")));