Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7782347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:30:52+00:00 2026-06-01T19:30:52+00:00

Introduction I’m currently doing some bug fixes in an application which is in the

  • 0

Introduction

I’m currently doing some bug fixes in an application which is in the style of Vimeo, that is, the user can record videos from the phone or iPad, and then upload the video for other users to see. The current problem have to do with uploading large files due to the way we are handling upload right now.

The Problem

So the problem is essentially that when uploading files to the server, we first allocate all the bytes that has to be uploaded in an NSData object. This string of bytes will then get attached to a standard HTTP Post message, and a receiving API will then handle it. The problem is that with large file sizes (which videos will quickly be), the app will simply crash because the NSData object takes up too much memory on the iDevice.

This is how the process works:

    Byte *buffer = malloc(content.defaultRepresentation.size);

    NSUInteger buffered = [content.defaultRepresentation getBytes:buffer fromOffset:0.0 length:content.defaultRepresentation.size error:nil];

    NSData *data = [NSData dataWithBytesNoCopy:buffer length:buffered];

    NSData *movieData = [NSData dataWithData:data];

I simply get the bytes from a video which has been saved in the iPhone or iPad’s standard camera roll. Then I put these bytes into an NSData object. The string of bytes from this NSData object will then simply be attached to a simple HTTP post message and send to an API.

The Question

The question then is, and the problem I see, is that the entire byte string have to be send in a single HTTP Post message. So is there any way in which you can load in chunks of the movie file and append it to the post message, so you don’t take up too much memory at a time? Or how could you go about doing this?

Thank you for your time 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:30:53+00:00Added an answer on June 1, 2026 at 7:30 pm

    I would suggest you to use ASIHTTPRequest library. It can upload files directly from the phone instead of loading the file into memory first.The logic here is to upload the movie file by breaking it into parts,called as multiparts and then upload it in queue fashion

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Introduction I have been so annoyed by applications that have a startup dialog which
Introduction I have some sort of values that I might want to access several
Introduction to the situation For an application I'm currently developing, I need to code
Introduction I've a question about something that I think it can become a little
Introduction: I'm working on an API which provides access to Picasa, Flickr and some
Introduction I have a app that has multiple tables, some with and some without
Google App Engine introduction specify this Your application can run in one of three
Introduction We have an OpenID Provider which we created using the DotNetOpenAuth component. Everything
Introduction I'm building an API wrapper for the SE API 2.0 Currently, I'm implementing
Introduction elem.hidden is a new property that allows to hide elements and detect whether

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.