fix: handle unicode filename and website uploads (#491)

* fix: print meaningful error message for invalid filenames

* fix: handle unicode dirnames and filenames

* chore: revert custom error message
This commit is contained in:
Cafe137
2022-07-26 13:13:25 +02:00
committed by GitHub
parent fd11f0166d
commit f82444f212
9 changed files with 167 additions and 7 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ async function selectStampAndUpload(page) {
}
async function assertUploadedContentAtPath(swarmHash, path, contentType) {
const response = await axios.get(`http://localhost:1633/bzz/${swarmHash}/${path}`)
const response = await axios.get(`http://localhost:1633/bzz/${swarmHash}/${encodeURI(path)}`)
if (response.status !== 200) {
throw new Error(`Expected 200 OK, got ${response.status}`)