如何:使用ember.js上传文件 [英] How: File Upload with ember.js

查看:122
本文介绍了如何:使用ember.js上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用ember.js做一个真正的文件上传(保存文件到服务器)

I was wondering how to do a real file upload (save file to server) with ember.js

有没有什么好的例子?

推荐答案

如果您在下面的链接中阅读答案,您将了解如何使用emberjs进行文件上传并保存到服务器:

If you read the answers in the link below, you will understand how to do file upload and save to server with emberjs:

使用Ember数据上传文件

在上面链接中的Toran Billups提供的答案中,我从他的答案中复制的下面的行将保存到服务器:

In the answer provided by 'Toran Billups' in the link above, the lines below, which I copied from his answer, do the saving to server:

var person = PersonApp.Person.createRecord({username: 'heyo', attachment: fileToUpload});

self.get('controller.target').get('store').commit()

这篇关于如何:使用ember.js上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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