Sails.js表示不提交任何数据的帖子 [英] Sails.js form post not submitting any data

查看:65
本文介绍了Sails.js表示不提交任何数据的帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我在发布表单时遇到了一个不寻常的问题。如果没有附件或附件图像文件大小小于100kb,表单帖子可以正常工作。但是当我尝试上传大于100kb的文件时,表单中没有任何元素被发布/提交。当我 console.log()时,它给出了未定义的值。我无法理解导致问题的原因。控制台屏幕上不显示任何错误。任何人都可以帮忙解决这个问题吗?

Recently I came to face an unusual problem while posting a form. The form post works fine when there is no attachment or the attachment image file size is less than 100kb. But when I tried to upload a file larger than 100kb no element in the form is being posted/submitted. When I console.log() the value it gives undefined. I can't understand what is causing the problem. No errors are shown on console screen. Can anyone help with this problem?

var name = req.param('name');
console.log(name);

我得到的结果是 undefined

我在Windows 8.1上使用sails v0.10.5。我使用postgres作为我的数据库。

I'm using sails v0.10.5 on windows 8.1. I'm using postgres as my database.

推荐答案

使用skipper,您必须将所有输入文件放在表单的末尾。
否则可能会出错。

With skipper, you have to put all your inputs files at the end of the form. Otherwise it could bug-out.

这篇关于Sails.js表示不提交任何数据的帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆