max blob size
This commit is contained in:
@@ -5,12 +5,14 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-12-13 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* tbl_query_box.php, ldi_table.php: maximum upload size
|
||||
* tbl_change.php: max BLOB upload size
|
||||
|
||||
2003-12-12 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* 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 <juststayalittlebitlonger@supergarv.de>
|
||||
* export.php: Fixed Regex
|
||||
|
@@ -645,7 +645,7 @@ foreach($loop_array AS $vrowcount => $vrow) {
|
||||
|| ($cfg['ProtectBinary'] == 'all' && $is_binary)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<td align="center" bgcolor="<?php echo $bgcolor; ?>">
|
||||
<td bgcolor="<?php echo $bgcolor; ?>">
|
||||
<?php
|
||||
echo $strBinaryDoNotEdit;
|
||||
if (isset($data)) {
|
||||
@@ -687,9 +687,23 @@ foreach($loop_array AS $vrowcount => $vrow) {
|
||||
// (displayed whatever value the ProtectBinary has)
|
||||
|
||||
if ($is_upload && $is_blob) {
|
||||
echo '<input type="file" name="fields_upload_' . urlencode($field) . $vkey . '" class="textfield" id="field_' . ($i * $m_rows) . '_3" />';
|
||||
echo '<input type="file" name="fields_upload_' . urlencode($field) . $vkey . '" class="textfield" id="field_' . ($i * $m_rows) . '_3" size="10" /> ';
|
||||
|
||||
// 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'] .= '/';
|
||||
|
Reference in New Issue
Block a user