From 20a4c0251edb3fe0777c39a5ced303376382ad25 Mon Sep 17 00:00:00 2001 From: Raj Kissu Rajandran Date: Fri, 31 Oct 2008 19:20:32 +0000 Subject: [PATCH] Fixed bug where MIME type could not be changed for BLOB repository references. Added bs_disp_as_mime_type.php to represent files under different MIME types until a better solution can be found --- bs_disp_as_mime_type.php | 49 +++++++++++++++++++++++++++++++++ js/functions.js | 6 ++-- libraries/blobstreaming.lib.php | 3 +- 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 bs_disp_as_mime_type.php diff --git a/bs_disp_as_mime_type.php b/bs_disp_as_mime_type.php new file mode 100644 index 000000000..f1e2e44fe --- /dev/null +++ b/bs_disp_as_mime_type.php @@ -0,0 +1,49 @@ += $f_size) + break; + } + + echo $content; + flush(); + + fclose($fHnd); +} +?> diff --git a/js/functions.js b/js/functions.js index baf7f8daf..54ef9a931 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1297,10 +1297,10 @@ function requestMIMETypeChange(db, table, reference, current_mime_type) function changeMIMEType(db, table, reference, mime_type) { // specify url and parameters for mootools AJAx request - var url = 'bs_change_mime_type.php'; + var mime_chg_url = 'bs_change_mime_type.php'; var params = { bs_db: db, bs_table: table, bs_reference: reference, bs_new_mime_type: mime_type }; // create AJAX object with above options and execute request - var chgRequest = new Ajax('bs_change_mime_type.php', { method: 'post', data: params, evalScripts: true }); - chgRequest.request(); + var chgRequest = new Request({ method: 'post', url: mime_chg_url, data: params, evalScripts: true }); + chgRequest.send(); } diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php index 3f6acd3fd..0b39fe843 100644 --- a/libraries/blobstreaming.lib.php +++ b/libraries/blobstreaming.lib.php @@ -181,7 +181,6 @@ EOD; Last_access_time TIMESTAMP COMMENT 'The last time the BLOB was accessed (read)', Content_type CHAR(128) COMMENT 'The content type of the BLOB - returned by HTTP GET calls', Blob_data LONGBLOB COMMENT 'The data of this BLOB' - // load PMA configuration ) ENGINE=PBMS; EOD; @@ -700,7 +699,7 @@ function PMA_BS_CreateReferenceLink($bs_reference, $db_name) // video content case 'application/x-flash-video': case 'video/mpeg': - $output .= ' (' . $GLOBALS['strViewVideo'] . '/a>)'; + $output .= ' (' . $GLOBALS['strViewVideo'] . ')'; break; // unsupported content. specify download default: