Kong / Kong/httpsnippet

Better support for multipart/form-data file upload examples

Aperta
#241 4 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
1.2k
Fork
242
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Currently in the JS / Fetch example, it shows multipart file uploads like so:

![image](https://user-images.githubusercontent.com/587740/150023128-b3f1d5ae-1507-4a30-b972-2c3dd061f91f.png)

This doesn't work as it just sends the string "logo.png" instead of the file.

A better example might be:

```js
// HTML file input, chosen by user
const fileInputs = document.querySelectorAll('input[type="file"]')

form.append("file", fileInputs[0].files[0]);
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by locating the JS/Fetch multipart/form-data example and the code that generates its file-upload snippet. Compare the current output with the issue's File-based example, then verify that generated multipart examples reference the selected file rather than the string "logo.png".

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, typescript
Ambito
tooling, web-dev
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.