@Hawkeye64 thanks for the answer) it needs to be configured on the backend. I don`t have access to the backend. maybe you know other ways?
Latest posts made by nomad
-
RE: Redirect to external link in browser
-
Redirect to external link in browser
Hi! I have a task: there is a redirect from the application to the site page. How to make this page open in the application? I tried to use <iframe> It opens the pages for youtube and others, but it’s exactly my link is forbidden. Error: Refused to display ‘https://someurl’ in a frame because it set ‘X-Frame-Options’ to ‘deny’. Are there any other ways besides <iframe>?
-
axios in notify actions
I’m trying to reload a page in a mobile application via notify.
Notify.create({ position: 'top', message: `${process.env.InternetSuccessText}`, html: true, // timeout: 1000, color: 'positive', actions: [{label: `${process.env.RefreshText}`, color: 'black', handler: () => { // this.loadCatalog( alert('reload') axios.get('https://my-url') .then((res) => { this.items = res.data}) .catch((er)=>{ console.log('errrrrrrrr:', er); }) }}], })
alert is triggered, axios is ignored, no errors.
-
RE: How to encode image to base64 in q-uploader?
@metalsadman thank you))) it helped me
-
How to encode image to base64 in q-uploader?
I’m just starting to learn Quasar (and Vue). I’m trying to encode a picture into a Base64 and save to MongoDB.
Undermentioned code works for the component <inpute> but I can’t redo it for the component <q-uploader>.
I will be thankful for any help<q-uploader v-model="image" @change="encodeToBase64" /> <q-btn type="btn" @click="sendPhoto">Save photo in mongo and go next page</q-btn>
methods: { encodeToBase64 (event) { event.preventDefault() const file = event.target.files[0] const canvas = document.createElement('canvas') const ctx = canvas.getContext('2d') const reader = new FileReader() reader.onload = event => { const img = new Image() img.onload = () => { if (img.width > MAX_WIDTH) { canvas.width = MAX_WIDTH canvas.height = (MAX_WIDTH * img.height) / img.width } else { canvas.width = img.width canvas.height = img.height } ctx.drawImage(img, 0, 0, canvas.width, canvas.height) this.image = canvas.toDataURL('image/png').replace(/^data:image\/(png|jpg);base64,/, '') console.log('RESULT/png', this.image) } img.src = event.target.result console.log('RESULT!', img.src) } reader.readAsDataURL(file) } }
sendPhoto (event) { event.preventDefault() this.$store.dispatch('image/create', {account_id: this.account_selected, image: this.image}) .then((res) => { this.$router.push({'path': '/nextReadings/' + res._id}) }) .catch((err) => { err.message = 'Error message' this.errorHandler(err.message) }) }