我陷入了"Amazon Cognito Identity用户池"流程.
我尝试了所有可能的代码来验证cognito用户池中的用户.但我总是得到错误说"错误:无法验证客户端4b*******fd的秘密哈希".
这是代码:
AWS.config.region = 'us-east-1'; // Region
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:b64bb629-ec73-4569-91eb-0d950f854f4f'
});
AWSCognito.config.region = 'us-east-1';
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'us-east-1:b6b629-er73-9969-91eb-0dfffff445d'
});
AWSCognito.config.update({accessKeyId: 'AKIAJNYLRONAKTKBXGMWA', secretAccessKey: 'PITHVAS5/UBADLU/dHITesd7ilsBCm'})
var poolData = {
UserPoolId : 'us-east-1_l2arPB10',
ClientId : '4bmsrr65ah3oas5d4sd54st11k'
};
var userPool = new AWSCognito.CognitoIdentityServiceProvider.CognitoUserPool(poolData);
var userData = {
Username : 'ronakpatel@gmail.com',
Pool : userPool
};
var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
cognitoUser.confirmRegistration('123456', true,function(err, result) {
if (err) {
alert(err);
return;
}
console.log('call result: ' + result);
});
Run Code Online (Sandbox Code Playgroud) 在我的一个模块中,我需要从输入[type ='file']浏览视频,之后我需要在开始上传之前显示所选视频.
我正在使用基本的HTML标签来显示.但它不起作用.
这是代码:
$(document).on("change",".file_multi_video",function(evt){
var this_ = $(this).parent();
var dataid = $(this).attr('data-id');
var files = !!this.files ? this.files : [];
if (!files.length || !window.FileReader) return;
if (/^video/.test( files[0].type)){ // only video file
var reader = new FileReader(); // instance of the FileReader
reader.readAsDataURL(files[0]); // read the local file
reader.onloadend = function(){ // set video data as background of div
var video = document.getElementById('video_here');
video.src = this.result;
}
}
});Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<video width="400" controls >
<source src="mov_bbb.mp4" id="video_here">
Your …Run Code Online (Sandbox Code Playgroud)我似乎无法找到将测试以下情况的JavaScript正则表达式:
你可以看到我想要的东西.我只需要它来验证文件路径.但似乎我发现的所有表达都不适用于JavaScript.
当我尝试存储大文件时,出现以下错误:
消息:S3::putObject(): [HttpVersionNotSupported] 不支持指定的 HTTP 版本。
我被困在其中一个 MySQl 查询中。我想要一个领域的两个过程。假设该字段名为“title”。现在 title 中有 BASE64_encoded 数据。现在我想用 mysql 获取所有小写数据。我试过下面的代码。但我没有得到我的结果。希望你能帮助我。
SELECT LOWER(FROM_BASE64(title)) as title FROM my_table;
Run Code Online (Sandbox Code Playgroud)
我知道,两者都是单独工作的。但不能在一起。现在我怎样才能在一个 mysql 中完成这两个过程。
javascript ×2
amazon-s3 ×1
filepath ×1
html5 ×1
html5-video ×1
jquery ×1
mysql ×1
regex ×1
video ×1