Commit ba7fc67f authored by jackie / Andrea Ida Malkah Klaura's avatar jackie / Andrea Ida Malkah Klaura
Browse files

FIX: double encode filenames for upload to tank

there have been issues with filenames that include spaces or other
characters. this is solved by double URL encoding.
parent a0021c65
...@@ -1049,7 +1049,7 @@ export default { ...@@ -1049,7 +1049,7 @@ export default {
}) })
} else if (this.uploadSourceFile) { } else if (this.uploadSourceFile) {
// TODO: add mechanism to indicate the running post request in the files table // TODO: add mechanism to indicate the running post request in the files table
axios.post(uri, { 'source-uri': encodeURI('upload://' + this.uploadSourceFile.name) }, { axios.post(uri, { 'source-uri': encodeURI(encodeURI('upload://' + this.uploadSourceFile.name)) }, {
withCredentials: true, withCredentials: true,
headers: { 'Authorization': 'Bearer ' + this.$parent.user.access_token } headers: { 'Authorization': 'Bearer ' + this.$parent.user.access_token }
}).then(response => { }).then(response => {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment