Android Question ABOUT HTTPJOB.POSTFILE() any restrictions?

little3399

Active Member
Licensed User
Longtime User
HI,

Is there exist any restrictions about the httpjob.postfile() ? such as the length of parameter
link,dir,filename

because I found httpjob.postfile() work very well , since I increase the length of these parameter , It seem can not work ... and show httpjob.success = true always .. but the file can not be upload to the server ..... ?

my httpjob.postfile() format just like this ....

http://xxxxx.example.com/aspnet/web...15901_XXXX_20140709162537.jpg&FileSize=942093

upload_2014-7-9_16-52-16.png
 

nwhitfield

Active Member
Licensed User
Longtime User
Sometimes, the limitation on the upload size is at the other end, on the server. I'm not familiar with ASP, preferring to handle this sort of thing in PHP, where for instance the server can have a maximum upload size specified in the php.ini file; since my app allows users to upload files, which can be fairly large if not resized first, I had to change that to allow a larger file.

A quick google for similar settings on ASP.net turned up this link, which might be a useful starting point:

http://stackoverflow.com/questions/288612/how-to-increase-the-max-upload-file-size-in-asp-net

However, if you're allowing users to upload photos from their device camera, for example, then you're going to find you need to increase that every couple of years, as people get phones with ever higher resolutions, and users don't think about resizing.

So, you might want to think about scaling the image before uploading it; not only can you then do your best to ensure it stays within a reasonable size, but your app may seem more responsive, as a big file can take a long time to upload - and sometimes (perhaps counterintuitively) that seems worse when connected via WiFi, as a typical home DSL connection has a pretty slow upload speed. I often find it's quicker to upload on mobile data than from home.

If you scale the file, you can cut down on the time taken to upload, and probably give users more useful feedback than if you just change the settings on the server and then try to fling a huge file at it and hope for the best.
 
Upvote 0

Javier Alonso

Member
Licensed User
Longtime User
If using ASP, check the IIS version. Up to IIS6, the setting for max request size is only in the IIS configuration, but IIS7 needs you to write in the web.config file the limit, in addition to setting up the IIS7 configuration properly. Hope this helps.
 
Upvote 0
Top