0

Currently I have been working on project where iPhone application need to send video in chunk to web-service developed in .NET and web-service need to receive all chunks and create and store file at .NET server.

So, is it possible to receive chunks and immediately store them in temp file so that we don't need to relay on buffer size in case large file is being uploaded (20-50 MB)? If someone provide the demo code then it would be great!

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Parth Patel
  • 307
  • 1
  • 6
  • 19

2 Answers2

0

You can receive a chunk of bytes and store in a file and keep append the chunks to it, while sending the last set of chunk, just add and save as valid file name. Hope this will help.

Rajesh Subramanian
  • 6,400
  • 5
  • 29
  • 42
  • I know this is how I need to do, but I don't know which method or class I should use to append chunk to temp file, so that when last chunk is sent with notification, appending it to temp file automatically create original file. – Parth Patel Jun 07 '12 at 10:12
0

You would need to use a combination of NSFileHandle class, -writeData: and -seekToEndOfFile to write NSData chunks to a File.

Hope this helps, and guides you to the right direction !

skram
  • 5,314
  • 1
  • 22
  • 26