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

    Using Q-uploader

    Help
    1
    1
    461
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jeimz173 last edited by

      hi newbie here,

      i just want to know if is it possible to create on your own method for uploading? i tried uploadfactory but it fails me. base on my understanding upload factory can be use to create on your own uploader so i made on my own but as ive said its not triggering my method…

      here is my code:

      <q-uploader
                url=""
                :upload-factory="uploadFactory"
              />
      
      methods: {
          async uploadFactory (file, updateProgress) {
            let vm = this
            try {
              console.log('test')
              var data = {
                productImage: file,
                userId: vm.user._id
              }
              var uploadUserProfile = await UserService.UploadUserProfile(data)
              console.log(uploadUserProfile)
            } catch (err) {
              vm.$q.notify({ position: 'top', color: 'positive', message: 'Whoops! File upload fail.' })
            }
          },
      

      please help me to fix this thank you!

      1 Reply Last reply Reply Quote 3
      • First post
        Last post