Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1dde9eb

Browse files
Added correct ContentType for json
1 parent 82e2b26 commit 1dde9eb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎functions/save.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ exports.handler = function(event, context, callback) {
2828
Body: JSON.stringify(jsondata.data),
2929
Bucket: "netlify-spaces",
3030
Key: "data.json",
31+
ContentType: "application/json",
3132
ACL: "public-read",
3233
};
3334

‎public/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<meta charset="UTF-8" />
66
<title>Untitled Document</title>
77

8+
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" />
9+
810
<!-- Netlify Identity Widget -->
911
<script type="text/javascript" src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
1012
</head>
@@ -44,7 +46,9 @@
4446
body: JSON.stringify({
4547
data: data,
4648
}),
47-
}).then((res) => res.text());
49+
}).then(function(res) {
50+
document.querySelector("#result").innerHTML = "Succes!";
51+
});
4852
}
4953
</script>
5054
</body>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /