docs: update formdata usage (#6374)

* docs: update formdata usage

* update generated files

* update generated files

* run workflow on push for dev only

* remove `js-api.json` from generated files check

* restore js-api.json before checking diff
This commit is contained in:
Amr Bashir 2023-03-17 18:13:02 +02:00 committed by GitHub
parent 00c60097c5
commit 058469114d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 9 deletions

View File

@ -9,16 +9,16 @@ on:
paths:
- '.github/workflows/check-generated-files.yml'
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
- 'core/config-schema/schema.json'
push:
branches:
- dev
paths:
- '.github/workflows/check-generated-files.yml'
- 'tooling/api/src/**'
- 'tooling/api/docs/js-api.json'
- 'core/tauri/scripts/bundle.global.js'
- 'core/tauri-utils/src/config.rs'
- 'tooling/cli/schema.json'
@ -60,7 +60,9 @@ jobs:
working-directory: tooling/api
run: yarn && yarn build
- name: check api
run: ./.scripts/ci/has-diff.sh
run: |
git restore tooling/api/docs/js-api.json
./.scripts/ci/has-diff.sh
check-schema:
runs-on: ubuntu-latest

File diff suppressed because one or more lines are too long

View File

@ -123,11 +123,7 @@ class Body {
* // alternatively, use a FormData:
* const form = new FormData();
* form.append('key', 'value');
* form.append('image', {
* file: '/path/to/file',
* mime: 'image/jpeg',
* fileName: 'image.jpg'
* });
* form.append('image', file, 'image.png');
* const formBody = Body.form(form);
* ```
*