- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 57 for upload_file (0.06 sec)
-
src/main/java/org/codelibs/fess/app/web/admin/design/AdminDesignAction.java
} File uploadFile; // normalize filename if (checkFileType(fileName, fessConfig.getSupportedUploadedMediaExtentionsAsArray()) && checkFileType(uploadedFileName, fessConfig.getSupportedUploadedMediaExtentionsAsArray())) { uploadFile = new File(getServletContext().getRealPath("/images/" + fileName));Registered: Sat Dec 20 09:19:18 UTC 2025 - Last Modified: Fri Nov 28 16:29:12 UTC 2025 - 17.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial002.py
path2 = tmp_path / "test2.txt" path2.write_bytes(b"<file content2>") client = TestClient(app) with path.open("rb") as file, path2.open("rb") as file2: response = client.post( "/uploadfiles/", files=( ("files", ("test.txt", file)), ("files", ("test2.txt", file2)), ), ) assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001_02.py
assert response.status_code == 200, response.text assert response.json() == {"message": "No file sent"} def test_post_uploadfile_no_body(client: TestClient): response = client.post("/uploadfile/") assert response.status_code == 200, response.text assert response.json() == {"message": "No upload file sent"} def test_post_file(tmp_path: Path, client: TestClient): path = tmp_path / "test.txt"Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_files/test_tutorial001.py
def test_post_upload_file(tmp_path, client: TestClient): path = tmp_path / "test.txt" path.write_bytes(b"<file content>") with path.open("rb") as file: response = client.post("/uploadfile/", files={"file": file}) assert response.status_code == 200, response.text assert response.json() == {"filename": "test.txt"} def test_openapi_schema(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 7.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/request-forms-and-files.md
## 定义 `File` 与 `Form` 参数 创建文件和表单参数的方式与 `Body` 和 `Query` 一样: {* ../../docs_src/request_forms_and_files/tutorial001.py hl[8] *} 文件和表单字段作为表单数据上传与接收。 声明文件可以使用 `bytes` 或 `UploadFile` 。 /// warning | 警告 可在一个*路径操作*中声明多个 `File` 与 `Form` 参数,但不能同时声明要接收 JSON 的 `Body` 字段。因为此时请求体的编码为 `multipart/form-data`,不是 `application/json`。 这不是 **FastAPI** 的问题,而是 HTTP 协议的规定。 /// ## 小结Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/en/docs/tutorial/request-forms-and-files.md
The files and form fields will be uploaded as form data and you will receive the files and form fields. And you can declare some of the files as `bytes` and some as `UploadFile`. /// warning
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/de/docs/tutorial/request-forms-and-files.md
Die Datei- und Formularfelder werden als Formulardaten hochgeladen, und Sie erhalten diese Dateien und Formularfelder. Und Sie können einige der Dateien als `bytes` und einige als `UploadFile` deklarieren. /// warning | Achtung
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/es/docs/tutorial/request-forms-and-files.md
Los archivos y campos de formulario se subirán como form data y recibirás los archivos y campos de formulario. Y puedes declarar algunos de los archivos como `bytes` y algunos como `UploadFile`. /// warning | Advertencia
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 1.6K bytes - Viewed (0) -
docs/pt/docs/tutorial/request-forms-and-files.md
Os arquivos e campos de formulário serão carregados como dados de formulário e você receberá os arquivos e campos de formulário. E você pode declarar alguns dos arquivos como `bytes` e alguns como `UploadFile`. /// warning | Atenção
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 1.6K bytes - Viewed (0) -
docs/ko/docs/tutorial/request-forms-and-files.md
`Body` 및 `Query`와 동일한 방식으로 파일과 폼의 매개변수를 생성합니다: {* ../../docs_src/request_forms_and_files/tutorial001.py hl[8] *} 파일과 폼 필드는 폼 데이터 형식으로 업로드되어 파일과 폼 필드로 전달됩니다. 어떤 파일들은 `bytes`로, 또 어떤 파일들은 `UploadFile`로 선언할 수 있습니다. /// warning | 경고 다수의 `File`과 `Form` 매개변수를 한 *경로 작동*에 선언하는 것이 가능하지만, 요청의 본문이 `application/json`가 아닌 `multipart/form-data`로 인코딩 되기 때문에 JSON으로 받아야하는 `Body` 필드를 함께 선언할 수는 없습니다.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.4K bytes - Viewed (0)