Mokgra
Mokgra

Reputation: 133

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. On the server-side I have a WCF service with a generic handler as the target for my uploader. 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. I don't see the file content there either. What am I missing?

Upvotes: 1

Views: 1166

Answers (1)

Mokgra
Mokgra

Reputation: 133

I was trying to use ng-flow which is based off of flow.js. 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. If you don't care for chunking, then set option 'testChunks' to false when doing your flow-init. Like this:

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

Doing this you will only receive the POST with the file. 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

Upvotes: 1

Related Questions