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

    Hardcoded form data in uploader

    Framework
    3
    6
    1718
    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.
    • A
      afd last edited by afd

      I’m testing Quasar’s v0.14 uploader together with kinto-attachment (an attachment plugin for Kinto storage) and there is a problem.

      The problem sits with both Quasar and Kinto:

      • in the uploader, there is a line:
      form.append('Content-Type', file.type || 'application/octet-stream')
      

      The form is then sent with xhr.send(form). There is no insertion point where that form can be further customized (so that I can remove the unwanted Content-Type field.

      • in kinto (irelevant for this) there will be an error when not all form fields are processable.

      I’ll address this problem to the Kinto maintainers, also, but there it may have bigger implications and that code be aligned with some package philosophy. Here, in Quasar, at least, maybe it’s possible to somehow register a “modifier” for the form, before it’s submitted? Or make the Content-Type field optional?

      1 Reply Last reply Reply Quote 0
      • A
        afd last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • rstoenescu
          rstoenescu Admin last edited by

          Hi, unfortunately no time to assess the situation now. Focusing on bringing v0.14 out there. Can we resume talks after v0.14 or is it too late?

          1 Reply Last reply Reply Quote 0
          • A
            afd last edited by

            Sorry, no worries, I was able to patch things on the Kinto side, using an event subscriber. I’ll add a ticket as a reminder. Anyway, it’'s just an edge case, where Kinto-attachment expects that submited forms only have “valid” fields, from its point of view, but quasar adds that field without an opportunity to tweak that.

            1 Reply Last reply Reply Quote 1
            • rstoenescu
              rstoenescu Admin last edited by

              Will see what I can do about that.

              1 Reply Last reply Reply Quote 0
              • L
                LouD last edited by

                @afd

                Hi, did you ever create a ticket on this? I am running into the same issue with the hard coded ‘Content-Type’ field.

                If not, I’ll create an issue for it.

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