We have a 1Mb size limit enabled (1048576 bytes) on our Forum but despite the file size reported by the OS being under 1Mb, a 106 error is generated. This is confusing our Members as the figures don't appear to make sense.
In the example below, 4 files were set to upload, until the 'Start Upload' button is clicked they all show the same size as reported by the OS, however, as the upload starts, the file is reported at more than double the size and obviously the upload fails and I can't understand why!
I should say that the file upload used to work as expected but at some point (not sure when) something has changed and now we are getting the error.
does that one file you say is reported as the wrong file size upload by itself? what about the other ones (the other three)? you mentioned four, but screenshot only shows 2...
when the upload generates the error, can you look at the file in the server temp directory (typical unix would be /tmp)... the file that was just uploaded to the server is being reported by that OS of being over the 1M limit...
if you cant see it in the temp dir, can you ftp it up and see the reported size?
just trying to see for sanity since the server via php and the $_FILES global tells us what the file size is...
All 4 files failed, all 4 files were being shown as under 1Mb before uploading started, in fact they were all shown as identical to the file sizes shown in the Terminal screenshot, I took the screenshot at that point to show that as soon as the upload starts the file size jumps up, in that case to 2.7Mb. You can see that the final file is reported as 989kb but when the upload started it too jumped up in size and failed.
Couldn't find any of the files in the temp dir so I transferred by ftp and despite the size shown in the Terminal, the ftp program shows the size as 1.1Mb on both my system and the server. That would explain why it fails as it's over 1Mb but it doesn't explain why it's reported as under 1Mb before upload or the massive jump in reported size on upload!
I assume its two different OS'es?? each OS can report different size... usually based on block size... they will have a smallest size they can represent so you may get varying different sizes... quick example: https://askubuntu.com/question.....ng-systems
Yes, 2 different versions of Linux surprisingly reporting different sizes!
Thanks for the link, I ran the commands given on my own Linux system and got 996k & 1.1Mb.
Windows 7 reports 994KB for the same file.
As for what changed, the only thing I can think of is that we had our Site updated about 9 months ago and I suspect the Server OS may have been updated at the same time.
The confusion appears to arise when we tell our Members there is a 1Mb upload limit, most of whom will be running a version of Windows which will tell them their file is under the limit when the Web Server & thus SP says it is over size!
Perhaps I should increase the upload limit to 1153435?