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

    Q-Uploader with Axios and Paperclip

    Help
    1
    1
    112
    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.
    • Z
      ZA last edited by ZA

      I can’t understand how to make this bundle work. When all this worked only on rails, I did not wonder, the pictures just loaded.
      Now I have [ Quasar, Rails, Paperclip gem] .
      I understand correctly that I need to send the path to the picture to the server, but not the file itself? Is the Paperclip using the path itself uploading the image to the server? 🤯
      I have such model

      params.require(:part).permit(..... , partimgs_attributes: [:id, :imgurl, :_destroy])
      

      And my request

      <q-uploader
                url=""
                label="Custom header"
                multiple
                :factory="loadImage"
              />
      
      methods: {
                  loadImage(file, updateProgress) {
                      this.$axios.patch('app/books/parts/' + this.id, {part: {partimgs_attributes: file}}).then(resp => {
                          console.log(resp.data)
                      })
                  }
      

      Do I need to request this as?

      {part: {partimgs_attributes: {imgurl: file.url}}}
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post