Closed artemgurzhii closed 6 years ago
I think you need to add that into ajaxSettings
. For example:
import Uploader from 'ember-uploader/uploaders/uploader';
const uploader = Uploader.extend({
ajaxSettings: {
headers: {
'Authorization': `Bearer ${TOKEN}`
}
}
})
@ezekg Yes, the problem was that I receive a token from the session
service(get(this, 'session.token')
) and I was a bit confused with this example.
I'm using
EmberUploader.Uploader
to send the file to the back-end server. But I didn't find any way to addAuthorization: Bearer TOKEN
header to the request.