For reasons that are out of scope here I should not send packets over 32 MB, so my php.ini looks like this:
; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 500M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20 ; Maximum size of POST data that PHP will accept. ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size post_max_size = 32M
Right now you need to spesify a max file size larger than the max post size as plupload is stil honoring the setting.
I'm not particularly happy with
upload_max_filesize = 500M but I guess for now I can live and work with it.
I tried custom code first:
'DownloadFile' => array( //'#type' => 'managed_file', '#type' => 'plupload', '#title' => t("Download"), '#title_display' => 'invisible', '#upload_validators' => array( 'file_validate_extensions' => array(), 'file_validate_size' => array(variable_get('my_max_file_size', 300 * 1024 * 1024)), ), '#upload_location' => 'public://mymodule/download', '#default_value' => $item->fid, '#required' => TRUE, '#plupload_settings' => array( 'runtimes' => 'html5', 'chunk_size' => '10mb', ), ),
It was showing 300MB under the Form API field all right. Sadly, everything over 20MB gave me:
Error: File too large: Some_182MB_file.zip
So I thought I'm doing something wrong and decided to try ready-made solution. I went for FileField Sources Plupload - I see 32 MB on the node add form, but 182 MB file uploaded all right.
So what's wrong with my implementation? I practically copied example from official documentation so I would expect it to work.