diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-11-01 04:39:07 +0100 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-11-01 05:01:13 +0100 |
| commit | 904f76dc4923502456299ce2c5abc99b026665ce (patch) | |
| tree | cb34964e1bd7a6391c0b42ab96f63d31d9def0b0 | |
| parent | c6907f301987088065ed1b6f98915f03207a678f (diff) | |
Revert <input type="hidden"> in upload_form_nojs.swig
Hidden <input> values did not work as I expected for POST requests. In
GET requests, the hidden values are added as query parameters to the
URL. For POST requests, the hidden inputs are simply more form-data to
upload in the POST request (another "file").
Because of this, the HTML output parameter is never passed to upload.php
and so it returns the default response instead (JSON). The goal is to
use the HTML response.
This reverts commit d6dc103c7229cb0e2e177ce0dfc0cfb528025ca9, where the
bug was introduced.
OK ewhal@
| -rw-r--r-- | pages/upload_form_nojs.swig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pages/upload_form_nojs.swig b/pages/upload_form_nojs.swig index a7b70ce..1952a0d 100644 --- a/pages/upload_form_nojs.swig +++ b/pages/upload_form_nojs.swig @@ -19,8 +19,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #} -<form enctype="multipart/form-data" method="post" action="upload.php"> - <input type="hidden" name="output" value="html"> +<form enctype="multipart/form-data" method="post" action="upload.php?output=html"> <input type="file" name="files[]" multiple data-max-size="{{max_upload_size}}MiB"> <input type="submit" value="Submit"> </form> |
