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 7795049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:57:12+00:00 2026-06-01T22:57:12+00:00

I currently need to upload large files from an iDevice to a server API.

  • 0

I currently need to upload large files from an iDevice to a server API. For this I’m attempting to use the ASIHTTPRequest library as it automatically supports uploading large files in queued chunks (before this I simply created an NSData instance with the bytes for the entire file at once and attached this to the POST message, but this causes the application to crash on larger files due to an excessive amount of RAM usage).

The problem is that when you need to upload files and add a file to the HTTP Post message, this is the syntax you need to use:

[theUploadRequest setFile:@"" forKey:@"videoupload"];

setFile requires a file path in a string format. The problem I’m currently having is that it does not seem like you are allowed to simply take the file path from a file which is not in your applications sandbox? Since I need to upload a file which is not in my application, but outside of it in the standard cameraroll.

I tried to make this quick test to see if I could create an NSData object and fill it with data from a file in the cameraroll, providing a path to it like this:

NSData *testData = [NSData dataWithContentsOfURL:theContent.defaultRepresentation.url];
NSLog(@"THE SIZE OF THE TEST DATA: %i", testData.length);

Note that “theContent” is an instance of an ALAsset, and is a file retrieved from the cameraroll. The result of this is simply a length of 0, which I suppose means you can’t simply do that.

Is there any way around this? Or would I have to somehow import the video file into the application’s sandbox?

  • 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-01T22:57:14+00:00Added an answer on June 1, 2026 at 10:57 pm

    Take a look here probably you’ll find something useful.

    Hope this helps.

    EDIT:
    For something simpler you can use the bit of code posted in this answer

    Implying that you need to copy the file somewhere before uploading it, especially if it is a big one.

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

Sidebar

Related Questions

Currently i need to construct and update large xml files. So what is the
I need to upload files and then parse them using paperclip? Currently it is
currently i am working on the nd file upload and download from ftp server
I need a way to upload large files (600 mb to 4 gb) in
I need help with my jcrop preview. I am following this tutorial from railscasts
We have a site where users upload files, some of them quite large. We've
I'm currently in the process of searching for a media upload library for PHP
I currently upload to a webservice on an nginx server using the upload module
I'm currently working on a fairly large project that has been migrated from Ant
I'm currently creating a PHP website where users need to be able to upload

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.