tags:

views:

31

answers:

1

I would like to add uploading files to my WCF REST web service, but I don't want an entire file to be uploaded - only 16kb portions of the file at every 256kb need to be uploaded.

So the user of the REST service doesn't have to faff around doing this, is it possible for a WCF service to only recieve certain portions WITHOUT uploading the entire file first, then picking out the bits needed?

+1  A: 

WCF does not do much when it comes to uploading a file. It receives a stream, which it then processes. It would be the client that would have to determine which parts of the file to send out on the stream. Some of the newer web API's being designed alongside HTML 5 might be able to provide some support for this... In the mean time, I know there are several Flash based file uploaders that are able to provide much richer, streaming file uploading. It might be possible to use Silverlight in a similar way to cherry-pick chunks of your client files, and send those chunks to the listening WCF service.

Regardless of what client-side technology you use, the choice of which file parts to send to the WCF service would have to be done at the client.

jrista