github elbywan/wretch 2.7.0

latest releases: 2.11.0, 2.10.0, 2.9.1...
14 months ago

2.7.0 (2023-09-12)

🏭 New feature(s)

  • Support FileList objects in the form data addon (3582809), closes #201
<head>
  <script type="module">
    import wretch from 'https://cdn.skypack.dev/wretch';
    import FormDataAddon from 'https://cdn.skypack.dev/wretch/addons/formData';

    const fileInput = document.querySelector("#myfiles");

    fileInput.addEventListener("change", () => {
      wretch("/post-files")
        .addon(FormDataAddon)
        .formData({ files: fileInput.files })
        .post()
        .text(console.log)
    });
  </script>
</head>
<body>
  <input id="myfiles" multiple type="file" />
</body>

📝 Documentation update(s)

  • Mention file names in the form data addon doc (411fb09), closes #197

Don't miss a new wretch release

NewReleases is sending notifications on new releases.