0
我有简单的grunt-contrib-connect服务器。它只存在本地使用,仅供本地访问。grunt-contrib-connect和文件上传
我希望能够从我的文件系统中选择文件,并将它们放在我的grunt项目中的目录中。
这里是我的HTML:
<form method="post" name="upload" action="uploaded" enctype="multipart/form-data">
<input type="file" name="files" multiple accept=".jpg,.png">
<input type="submit">
</form>
在这里,我运行连接:
grunt.config('connect.ui', {
\t options: {
\t \t port: 9000,
\t \t protocol: 'http',
\t \t hostname: 'localhost',
\t \t keepalive: true,
\t \t middleware: [
\t \t \t function theMiddleware(req, res) {
\t \t \t \t res.setHeader('Access-Control-Allow-Origin', '*');
\t \t \t \t res.setHeader('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
\t \t \t \t processRequest(req, res);
\t \t \t }
\t \t ]
\t }
});
但我真的没有任何想法如何牛逼o将选定的文件放入grunt项目的目录中。
我会很快听到任何想法或解决方案。
在此先感谢。
太谢谢你了! – durakdurakom
使用stackoverflow的标准方式是接受帮助你的答案;-) – hereandnow78