1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +02:00

PostgreSQL: Upload binary files to bytea fields

This commit is contained in:
Jakub Vrana
2018-02-06 15:42:14 +01:00
parent b649fb2f3f
commit 17b110f0d5
4 changed files with 24 additions and 3 deletions

View File

@@ -1003,7 +1003,7 @@ function input($field, $value, $function) {
* @return string or false to leave the original value
*/
function process_input($field) {
global $adminer;
global $adminer, $driver;
$idf = bracket_escape($field["field"]);
$function = $_POST["function"][$idf];
$value = $_POST["fields"][$idf];
@@ -1041,7 +1041,7 @@ function process_input($field) {
if (!is_string($file)) {
return false; //! report errors
}
return q($file);
return $driver->quoteBinary($file);
}
return $adminer->processInput($field, $value, $function);
}