No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. nomad
    N
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 6
    • Best 0
    • Groups 0

    nomad

    @nomad

    0
    Reputation
    12
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    nomad Follow

    Latest posts made by nomad

    • RE: Redirect to external link in browser

      @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?

      posted in Help
      N
      nomad
    • 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>?

      posted in Help
      N
      nomad
    • 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.

      posted in Help
      N
      nomad
    • RE: How to encode image to base64 in q-uploader?

      @metalsadman thank you))) it helped me

      posted in Help
      N
      nomad
    • 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)
              })
          }
      
      posted in Help
      N
      nomad