• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Gareth-Elms · Nov 10, 2012 at 09:36 PM · iosnetworkwwwform

4k data limit on wwwform post?

On my iphone game I'm using WWWForm to send trace data to a url. Is there a 4k limit on the size of a request on ios?

If my trace data is above 4k I get "The network connection was lost" error coming back from the WWW request.

Is this a known limitation? I've read that there is a 4k limit on cookies in ios. Does WWWForm use cookies?!?

Thanks

Comment
ina

People who like this

1 Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image asafsitner · Nov 11, 2012 at 12:08 AM 0
Share

If I recall correctly there's a general 4K limit on data sent with the WWW class.

avatar image Gareth-Elms · Nov 11, 2012 at 10:55 AM 0
Share

There's something going on like that. I though a POST request would have been limitless but perhaps not on ios. I've reduced the amount of data I send. If I need more data I'll chunk it through a sequence of requests

2 Replies

  • Sort: 
avatar image
Best Answer

Answer by GerryM · Nov 11, 2012 at 03:24 PM

You can upload more than 4k via WWWForm(), even on iOS, just tried it. I'm streaming a 25k file like this (inside a coroutine):

 WWWForm postForm = new WWWForm();
 postForm.AddBinaryData("theFile", buffer, localFileName, "text/plain");
 
 WWW upload = new WWW(uploadURL,postForm);        
 yield return upload;
 
 if (upload.error == null)
    Debug.Log("Upload done: " + upload.text);
 else
    Debug.Log("Error during upload: " + upload.error);
         
     

Comment
Fattie

People who like this

1 Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ina · Nov 11, 2012 at 03:30 PM 0
Share

how frequently are you calling the coroutine?

avatar image GerryM · Nov 11, 2012 at 03:38 PM 1
Share

Calling the upload only once, just needed to upload one file. Maybe stacking too many calls might cause a problem.

avatar image Gareth-Elms · Nov 11, 2012 at 06:18 PM 0
Share

Ah I was using postForm.AddField() which might work differently. I'll test it thanks.

avatar image

Answer by DaveF · Sep 23, 2016 at 11:44 AM

Could it be your web server? I know I've had to adjust max. Allowed content settings on my IIS server to allow large pictures to be uploaded.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

WWWForm doesn't work on iOS 0 Answers

Setting maxConnections to -1 not working 0 Answers

NetworkReachability Class IPV6 compatible 0 Answers

www.error returning "cannot connect to destination host" and crash on IOS 0 Answers

UDPSend not working with iPad over LAN 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges