我想在dropzone的成功事件之后或者dropzone的完整事件之后回滚原始的dropzone及其消息"drop files here".
我不希望在成功或完成后看到预览.
这是我的dropzone脚本:
Dropzone.options.myAwesomeDropzone = {
paramName: "file", // The name that will be used to transfer the file
maxFilesize: 2, // MB
parallelUploads: 1,
success: function(file, response) {
var imageSrc = response;
$(".img-responsive").attr('src', imageSrc);
if (imageSrc == '/assets/images/offerfeatimg.jpg') {
$(".removebutton").hide();
} else {
$(".removebutton").show();
}
}
};
Run Code Online (Sandbox Code Playgroud) 我很难用pgsql设置laravel 5.3(在wamp / windows上运行)。当我尝试使用“ php artisan migration”迁移表时,出现错误“ PDO异常-无法找到驱动程序”
$dbh = new PDO("pgsql:dbname=rotocms;host=127.0.0.1", "postgres", "mypassword");
if($dbh){
echo "connected";
}else{
echo 'there has been an error connecting';
}
所以我被困住了,无法在Laravel中进行迁移。我的.env:
DB_CONNECTION = pgsql
DB_HOST = 127.0.0.1
DB_PORT = 5432
DB_DATABASE =我的数据库名称
DB_USERNAME = postgres
DB_PASSWORD =密码
这是laravel错误堆栈:
local.ERROR: PDOException: could not find driver in C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:119
Stack trace:
#0 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(119): PDO->__construct('pgsql:host=127....', 'postgres', 'password', Array)
#1 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(56): Illuminate\Database\Connectors\Connector->createPdoConnection('pgsql:host=127....', 'postgres', 'password', Array)
#2 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Database\Connectors\PostgresConnector.php(36): Illuminate\Database\Connectors\Connector->createConnection('pgsql:host=127....', Array, Array)
#3 C:\wamp64\www\myproject\vendor\laravel\framework\src\Illuminate\Database\Connectors\ConnectionFactory.php(100): Illuminate\Database\Connectors\PostgresConnector->connect(Array) …Run Code Online (Sandbox Code Playgroud)