简体   繁体   English

flow.js上传的文件数据在哪里?

[英]Where is the file data for a flow.js upload?

I'm building an uploader into my web page and trying to use flow.js as my uploading tool. 我正在将一个上传器构建到我的网页中,并尝试使用flow.js作为我的上传工具。 On the server-side I have a WCF service with a generic handler as the target for my uploader. 在服务器端,我有一个WCF服务,其中有一个通用处理程序作为我的上传器的目标。 I do get the uploader to send a request to the handler, and when I inspect the contents, I get just the query string, but not the actual file content. 我确实让上传者向处理程序发送了一个请求,当我检查内容时,我只会得到查询字符串,而不是实际文件内容。 Or at least I don't know where it is. 或者至少我不知道它在哪里。

Looking at Fiddler I can see that the server call was a GET with a query string of parameters. 查看Fiddler,我可以看到服务器调用是带有参数查询字符串的GET。 I don't see the file content there either. 我也看不到文件内容。 What am I missing? 我想念什么?

I was trying to use ng-flow which is based off of flow.js. 我正在尝试使用基于flow.js的ng-flow。 A quick trip to flow.js github ( https://github.com/flowjs/flow.js ) and I realized that the GET is a test to get chunks for your files initialized, then the POST with the file chunks is sent. 快速浏览flow.js github( https://github.com/flowjs/flow.js ),我意识到GET是对初始化文件块的测试,然后发送包含文件块的POST。 If you don't care for chunking, then set option 'testChunks' to false when doing your flow-init. 如果您不希望分块,则在执行flow-init时将选项“ testChunks”设置为false。 Like this: 像这样:

<html flow-init="{target:'SomeFileHandler.ashx',testChunks:false}">

Doing this you will only receive the POST with the file. 这样做只会收到带有文件的POST。 Hope this helps someone in the future! 希望这对以后的人有所帮助! I may edit this later when I decided to handle chunks. 当我决定处理块时,可以稍后进行编辑。 Also, I did find an ASP.NET MVC implementation that may be an interesting read here: https://github.com/DmitryEfimenko/FlowJs-MVC 另外,我确实找到了一个ASP.NET MVC实现,在这里可能会很有趣: https : //github.com/DmitryEfimenko/FlowJs-MVC

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM