Closed phongyewtong closed 4 years ago
solve it by
simpleUpload: {
// The URL that the images are uploaded to.
uploadUrl: 'https://firebasestorage.googleapis.com/v0/b/bucketName.appspot.com/o/images',
// Enable the XMLHttpRequest.withCredentials property.
withCredentials: false,
// Headers sent along with the XMLHttpRequest to the upload server.
headers: {
'Authorization': 'Bearer ' + token
},
Hi @phongyewtong I am new to this javascript build module and I somehow managed to build my own version of ckeditor classic build with many custom plugins. I have a question with this simple uploader, as what already seen from your code, you use token as your auth and you put it as a variable 'token'. How do you pass this token variable if we have to build the module first before the runtime (supposedly you got the token during the runtime after login or smth)?
I got this error below, Is there anyway to set 'Access-Control-Allow-Origin' header in the response on ckeditor5 simpleupload plugin? it works on postman but not my website on localhost. I not sure what i am doing wrong here?
Error on client
Client code
Server firebase: cors.json
Ran this on google cloud terminal
gsutil cors set cors.json gs://myservername.appspot.com
package.json
might be a similar issue: https://stackoverflow.com/questions/42803394/cors-credentials-mode-is-include
If you'd like to see this fixed sooner, add a 👍 reaction to this post.