tushargugnani / vue-step-wizard

A simple VueJS Step / Form Wizard plugin with Validation Support.
MIT License
118 stars 29 forks source link

Can't save it to fire base #4

Closed azermann closed 4 years ago

azermann commented 4 years ago

Preflight response is not successful (error 1) [Error] Fetch API due to access control checks. Failed to load resource: Preflight response is not successful Unhandled Promise Rejection: Error: internal

search everywhere but none fix it on local or published to firebase how can we fix this and save data to firebase

tushargugnani commented 4 years ago

@azermann Where exactly you are getting this error?

azermann commented 4 years ago

@onclick event after I close alert try to upload image to storage this.formData.imageURL = null const storageRef=firebase.storage().ref(${this.formData.image.name}).put(this.formData.image) storageRef.on(state_changed,snapshot=>{ this.formData.uploadValue = (snapshot.bytesTransferred/snapshot.totalBytes)*100 }), error=>{console.log(error.message)}, in here

tushargugnani commented 4 years ago

The error you mentioned is related to the backend API where you are sending your data to. This package deals with the frontend part of managing the multi-step form.

My advice would be try sending the data in required format to your API using a rest client (PostMan) and see if the API is working correctly. If yes, compare it debugging the data that you are sending on the submit event of the multi step form.