Skip to content

Commit 373d135

Browse files
handle file field when get from S3
1 parent 8e0d664 commit 373d135

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/plugins/axios.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ const _axios = axios.create(config)
2727
_axios.interceptors.request.use(
2828
function (config) {
2929
// Do something before request is sent
30-
setAuthenticationHeader(config.headers.common)
30+
if (
31+
config.noAuthorization === undefined ||
32+
config.noAuthorization === false
33+
) {
34+
setAuthenticationHeader(config.headers.common)
35+
}
3136
return config
3237
},
3338
function (error) {

src/views/account/ProfileUpdate.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ export default class ProfileUpdate extends Vue {
8989
this.phoneNumber = this.user.phone_number
9090
9191
if (this.user.avatar !== null) {
92-
Vue.axios.get(this.user.avatar)
92+
Vue.axios.get(this.user.avatar, {
93+
// @ts-expect-error this is our custom config
94+
noAuthorization: true
95+
})
9396
.then(res => {
9497
if (this.user.avatar !== null) {
9598
const parts = this.user.avatar.split('/')

0 commit comments

Comments
 (0)