Hardcoded form data in uploader



  • 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:

    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.

    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?



  • This post is deleted!

  • Admin

    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?



  • 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.


  • Admin

    Will see what I can do about that.


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.