mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-24 12:14:05 +03:00
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:
parent
00c60097c5
commit
058469114d
8
.github/workflows/check-generated-files.yml
vendored
8
.github/workflows/check-generated-files.yml
vendored
@ -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
@ -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);
|
||||
* ```
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user