使用Angular 1.6.2从本地目录上传文件 [英] Upload a file from a local directory using Angular 1.6.2

查看:155
本文介绍了使用Angular 1.6.2从本地目录上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用angular 1.6.2构建应用程序。我的一个部分中有一个图像上传按钮。我正在开发网站并在我的本地笔记本电脑上运行服务器。我需要做的就是将这些图像上传到我项目中的图像文件夹中。我不需要做任何花哨的事情。我只能使用HTML5,还是必须使用JavaScript或jQuery?如果我确实需要js或jq,代码会是什么样的?

I am building an application using angular 1.6.2. I have an image upload button in one of my partials. I'm developing the site and running the server on my local laptop. All I need to do is upload these images into an images folder in my project locally. I don't need to do anything fancy. Am I able to get away with only using HTML5 or do I have to use JavaScript or jQuery? If I do need js or jq, what would the code look like?

这是我的部分:

<div class="form-group">
       <label>Please Upload your Images</label>
       <input type="file" class="form-control-file" id="inputFile" multiple>
</div>

推荐答案

感谢您输入的人!这个项目是为了学校作业。即使我可能没有权限使用其他语言,我也可以用Python编写这个:使用Python创建一个简单的HTML文件上传页面。

Thanks for your input guys! This project is for a school assignment. Even though I may not have permission to use another language, I may wind up writing this in Python: Creation of a simple HTML file upload page using Python. .

这篇关于使用Angular 1.6.2从本地目录上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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