Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for uploadable (0.16 sec)

  1. src/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go

    					// the counter data contained therein was all from after the asof
    					// date.
    					//
    					// TODO(rfindley): store the begin date in reports, so that we can
    					// verify this assumption.
    					u.logger.Printf("Uploadable: %s", fi.Name())
    					ans.readyfiles = append(ans.readyfiles, filepath.Join(localdir, fi.Name()))
    				}
    			} else {
    				// ...otherwise fall back on the old behavior of uploading all
    				// unuploaded files.
    				//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    		X:        computeRandom(), // json encodes all the bits
    		Week:     expiryDate,
    		LastWeek: lastWeek,
    	}
    	if report.X > u.config.SampleRate && u.config.SampleRate > 0 {
    		u.logger.Printf("X: %f > SampleRate:%f, not uploadable", report.X, u.config.SampleRate)
    		uploadOK = false
    	}
    	var succeeded bool
    	for _, f := range countFiles {
    		fok := false
    		x, err := u.parseCountFile(f)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  3. docs/en/docs/reference/uploadfile.md

    # `UploadFile` class
    
    You can define *path operation function* parameters to be of the type `UploadFile` to receive files from the request.
    
    You can import it directly from `fastapi`:
    
    ```python
    from fastapi import UploadFile
    ```
    
    ::: fastapi.UploadFile
        options:
            members:
                - file
                - filename
                - size
                - headers
                - content_type
                - read
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 472 bytes
    - Viewed (0)
  4. docs/de/docs/reference/uploadfile.md

    # `UploadFile`-Klasse
    
    Sie kรถnnen *Pfadoperation-Funktionsparameter* als Parameter vom Typ `UploadFile` definieren, um Dateien aus dem Request zu erhalten.
    
    Sie kรถnnen es direkt von `fastapi` importieren:
    
    ```python
    from fastapi import UploadFile
    ```
    
    ::: fastapi.UploadFile
        options:
            members:
                - file
                - filename
                - size
                - headers
                - content_type
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 30 18:17:09 UTC 2024
    - 495 bytes
    - Viewed (0)
  5. docs_src/request_files/tutorial001_03_an.py

    from fastapi import FastAPI, File, UploadFile
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: Annotated[UploadFile, File(description="A file read as UploadFile")],
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 431 bytes
    - Viewed (0)
  6. docs_src/request_files/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File()]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(file: UploadFile):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 322 bytes
    - Viewed (0)
  7. docs/em/docs/tutorial/request-files.md

    โœ”๏ธ ๐Ÿคฏ ๐Ÿ‘ˆ ๐Ÿ‘‰ โ›“ ๐Ÿ‘ˆ ๐ŸŽ‚ ๐ŸŽš ๐Ÿ”œ ๐Ÿช ๐Ÿ’พ. ๐Ÿ‘‰ ๐Ÿ”œ ๐Ÿ‘ท ๐Ÿ‘ ๐Ÿคช ๐Ÿ“.
    
    โœ‹๏ธ ๐Ÿ“ค ๐Ÿ“š ๐Ÿ’ผ โ” ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ’ฐ โšช๏ธโžก๏ธ โš™๏ธ `UploadFile`.
    
    ## ๐Ÿ“ ๐Ÿ”ข โฎ๏ธ `UploadFile`
    
    ๐Ÿ”ฌ ๐Ÿ“ ๐Ÿ”ข โฎ๏ธ ๐Ÿ†Ž `UploadFile`:
    
    ```Python hl_lines="12"
    {!../../../docs_src/request_files/tutorial001.py!}
    ```
    
    โš™๏ธ `UploadFile` โœ”๏ธ ๐Ÿ“š ๐Ÿ“ˆ ๐Ÿคญ `bytes`:
    
    * ๐Ÿ‘† ๐Ÿšซ โœ”๏ธ โš™๏ธ `File()` ๐Ÿ”ข ๐Ÿ’ฒ ๐Ÿ”ข.
    * โšซ๏ธ โš™๏ธ "๐Ÿงต" ๐Ÿ“:
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. docs_src/request_files/tutorial001_03_an_py39.py

    from typing import Annotated
    
    from fastapi import FastAPI, File, UploadFile
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_file(file: Annotated[bytes, File(description="A file read as bytes")]):
        return {"file_size": len(file)}
    
    
    @app.post("/uploadfile/")
    async def create_upload_file(
        file: Annotated[UploadFile, File(description="A file read as UploadFile")],
    ):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 421 bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/request-files.md

    Keep in mind that this means that the whole contents will be stored in memory. This will work well for small files.
    
    But there are several cases in which you might benefit from using `UploadFile`.
    
    ## File Parameters with `UploadFile`
    
    Define a file parameter with a type of `UploadFile`:
    
    === "Python 3.9+"
    
        ```Python hl_lines="14"
        {!> ../../../docs_src/request_files/tutorial001_an_py39.py!}
        ```
    
    === "Python 3.8+"
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Wed Mar 13 19:02:19 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  10. docs_src/request_files/tutorial002.py

    from typing import List
    
    from fastapi import FastAPI, File, UploadFile
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: List[bytes] = File()):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: List[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 811 bytes
    - Viewed (0)
Back to top