--- title: Pre-upload files description: GET /api/file/preUploadFile.do: Pre-upload file interface description, including path, method, parameters and return information. slug: api-get-api-file-preuploadfile-do lang: en category: File API category_order: 8 order: 107 api_method: GET api_path: /api/file/preUploadFile.do api_label: Pre-upload files keywords: - API - Pre-upload files - /api/file/preUploadFile.do --- # Pre-upload files | Properties | Values | | --- | --- | | HTTP methods | `GET` | | Interface path | `/api/file/preUploadFile.do` | | Category | File API | ## Interface description Interface path: `/api/file/preUploadFile.do` HTTP method: `GET` **HTTP method:** `GET` #### URL parameters Parameter name Comment (description) parent_id target folder id (required) (you can ignore this when uploading in the root directory) string name file name (required) string file_id When uploading a new version, you need to specify the new version of the file to upload (you can ignore this when uploading new files) string #### The correct return result is as follows {"upload_token":"92808ecfc2ac4e0ebc0b912edac3be4a","url":"http://testdocument.babel.cc/api/file/uploadPdf.do","su ccess":true,"code":0} #### Return field description Attribute name type description url string This url can only be used once and is valid for 1 hour. Call this url to upload a file. After success, fileId, fileName, version, etc. will be returned. upload_token string is used as a parameter of post when uploading files. ## Call instructions - Before calling, you need to complete [Get token](api-post-api-token-do.md) or the corresponding login-free authentication, and carry `Authorization: Bearer ` in the request header. - If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail. - Category: File API.