摘要: file自带一些有用的属性,今天整理一下 html: 1.multiple:是否多选,如果在html上面写上multiple="multiple"或者multiple就可以实现多选 2.accept:文件格式,这个可以控制文件格式,比如jpeg和gif还有Png之类的,写法是这样的<input ty 阅读全文
posted @ 2022-12-06 16:12 SadicZhou 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 使用express-jwt解析token时req.user=undefind, 原因:在路由文件里使用express的实例app来use express-jwt中间件了,这样做是不规范的 解决方法:使用router实例来use express-jwt即可 router.use(expressJWT( 阅读全文
posted @ 2022-12-06 02:00 SadicZhou 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 在做身份认证的时候前端请求头上增加authorization 属性后报以下错误: Access to XMLHttpRequest at 'http://127.0.0.1:500/api/login' from origin 'http://127.0.0.1:5501' has been blo 阅读全文
posted @ 2022-12-06 01:11 SadicZhou 阅读(653) 评论(0) 推荐(0) 编辑