diff --git a/ChangeLog b/ChangeLog index 05a2ede60..c2f8db296 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,12 +5,14 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-12-13 Marc Delisle + * tbl_query_box.php, ldi_table.php: maximum upload size + * tbl_change.php: max BLOB upload size + 2003-12-12 Marc Delisle * db_details.php, libraries/common.lib.php, lang/*: new feature to display the maximum upload size - TODO: - put this everywhere we can upload - - detect also the max based on *BLOB max field size - - detect if upload succeeded + TODO: detect if upload succeeded 2003-12-12 Garvin Hicking * export.php: Fixed Regex diff --git a/tbl_change.php b/tbl_change.php index ef3900431..61729a724 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -645,7 +645,7 @@ foreach($loop_array AS $vrowcount => $vrow) { || ($cfg['ProtectBinary'] == 'all' && $is_binary)) { echo "\n"; ?> - + $vrow) { // (displayed whatever value the ProtectBinary has) if ($is_upload && $is_blob) { - echo ''; + echo ' '; + + // find maximum upload size, based on field type + $max_field_sizes = array( + 'tinyblob' => '256', + 'blob' => '65536', + 'mediumblob' => '16777216', + 'longblob' => '4294967296'); // yeah, really + + $this_field_max_size = $max_upload_size; // from PHP max + if ($this_field_max_size > $max_field_sizes[$type]) { + $this_field_max_size = $max_field_sizes[$type]; + } + echo PMA_displayMaximumUploadSize($this_field_max_size) . "\n"; + echo ' ' . PMA_generateHiddenMaxFileSize($this_field_max_size) . "\n"; } - + if (!empty($cfg['UploadDir'])) { if (substr($cfg['UploadDir'], -1) != '/') { $cfg['UploadDir'] .= '/';