小编Gia*_*rco的帖子

使用 aws sdk (nodejs) 在 AWS S3 中创建一个空文件夹

我正在尝试在 aws s3 中创建一个文件夹 我成功创建了一个文件夹但不是空的

const Obj = new AWS.S3().putObject({
 
  Key: `/`, //the file you should put inside the folder
  Bucket: `${bucketName}/${req.body.modpack}`, // main bucket/folder I want to create
});
Run Code Online (Sandbox Code Playgroud)

无法删除的“”如果我这样做,我recive和埃罗是逼我添加它

javascript amazon-s3 amazon-web-services node.js

6
推荐指数
2
解决办法
6793
查看次数

如何偏移css网格中的div

这是可能的“偏移一个divCSS网格的图像中?图片

html css css-grid

5
推荐指数
1
解决办法
1万
查看次数

css网格儿童比例过渡/动画

我试图在点击 CSS 网格时缩放子元素的大小,但没有成功。问题是我实际上没有缩放它,我只是更改了列和行位置以填充所有网格。

div {
      width: 100%;
      height: 140px;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      grid-template-rows: 1fr 1fr;
      grid-gap: 20px;
  }


div:active {
    grid-column-start: 1;
    grid-column-end: 5;
    grid-row-start: 1;
    grid-row-end: 4;
    height: 140px; //the size of the grid is 140px just because it doesn't work if you do 100%
    z-index: 3;
 }
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

正如您所看到的,结果不是最好的,它们似乎没有“缩放”,而只是从顶部下降。我尝试使用 css grid,但我不知道这是否是最好的方法(css grid 而不是 flexbox)。

在此输入图像描述

html css flexbox css-grid

3
推荐指数
1
解决办法
1812
查看次数

AWS Dynamodb 配置中缺少凭证,如果使用 AWS_CONFIG_FILE,请设置 AWS_SDK_LOAD_CONFIG=1

我正在尝试在dynamodb中的添加元素,如下例所示,但是当我运行它时,我收到此错误消息:Missing credentials in the config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1

aws.config.update({
   region: "eu-west-1",
   endpoint: "http://localhost:8080",})


  let ddb = new aws.DynamoDB.DocumentClient({
    apiVersion: "2012-08-10",
  });

  let params = {
    TableName: "NameOfTheTable",
    Item: {
      uuid: JSON.stringify(132), // random number for testing
      name: JSON.stringify(req.query.mod), //data i'm passing in
    },
  };

const addMod = ddb.put(params, function (err, data) {
  if (err) {
    console.log("Error", err);
  } else {
    console.log("Success", data);
  }
});
return res.send(addMod);

});
Run Code Online (Sandbox Code Playgroud)

我想可能我错过了accessKeyIdaccessSecretKey …

javascript database amazon-web-services node.js amazon-dynamodb

3
推荐指数
1
解决办法
3979
查看次数

Angular,如何在切换时更改<mat-button>中的文本

我怎样才能改变文本垫子按钮,当我切换了吗?

<form class="example-form" style="text-align: center;" [formGroup]="loginForm" (ngSubmit)="buttonClicked()">
  <mat-card [@myAwesomeAnimation]='state' (mouseenter)="animateMe()" (mouseleave)="animateMe()" style="padding: 2vh">
      <input type="text" class="mainInput" style="font-size: 18px;" matInput autofocus shouldLabelFloat="false" placeholder="Insert Your URL Here" autocomplete="off">
  </mat-card>
  <br>
  <button mat-raised-button color="accent"></button>

</form>
Run Code Online (Sandbox Code Playgroud)

angular-material angular

1
推荐指数
1
解决办法
2036
查看次数

DynamoDB getItem 仅包含 id (aws sdk)

有没有什么方法可以只使用id来获取一个或多个元素具有相同的 id)?而不使用alsoe 属性?name

  let params = {
  TableName: "TableName",
  Key: {
    id: { S: req.body.ProjectId },
    // name: { S: req.body.name }
  },
};

ddb.getItem(params, function (err, data) {
  if (err) {
    console.log("Error", err);
    res.send(err);
  } else {
    console.log("Success", data);
    res.send(data);
  }
});
Run Code Online (Sandbox Code Playgroud)

});

javascript amazon-web-services node.js amazon-dynamodb aws-sdk

1
推荐指数
1
解决办法
4987
查看次数