0

The S3UploadInputStream was deprecated after the release of iOS6. Currently I am using iOS7,so I want to upload throttling stream using S3 AWS-iOS-SDK. What is feasible solution to upload throttling stream.

Irfan
  • 4,301
  • 6
  • 29
  • 46
Snehal
  • 11
  • 1
  • 6
  • What is your use case for throttling? This was originally added to work around a bug in the network stack on iOS. – Bob Kinney Mar 17 '14 at 18:18
  • @BobKinney I want to upload throttled stream to Amazon Server using S3. ` // The S3UploadInputStream was deprecated after the release of iOS6. S3UploadInputStream *stream = [S3UploadInputStream inputStreamWithData:dataToUpload]; if ( using3G ) { // If connected via 3G "throttle" the stream. stream.delay = 0.2; // In seconds stream.packetSize = 16; // Number of 1K blocks } ` But this is deprecated, so is there any other way to achieve this? – Snehal Mar 18 '14 at 04:51
  • The solution we had was unfortunately sub-optimal and caused some issues with threading, so we deprecated it as it was only for the 3G bug. You didn't really answer my question, why do you need to offer throttled uploads? – Bob Kinney Mar 18 '14 at 16:23
  • @BobKinney I need throttled uploads for bandwidth management, I don't want to use full bandwidth for my application. – Snehal Mar 19 '14 at 04:51
  • Unfortunately you will have to modify the SDK source to add this throttling. If the issue is end user's cell data plans, you might consider just not allowing the upload unless the user is on wifi. – Bob Kinney Mar 20 '14 at 22:46

1 Answers1

0

I created my own framework uploadStream same as S3UploadInputStream. In this framework i achieved throttling for uploading using delay and packet size. Its working well.

Snehal
  • 11
  • 1
  • 6