Please check whether the fileUpload url obtained by using the interface for obtaining the file address has been used to upload the file stream in the HTTP PUT manner. If it has not been uploaded, please call the URL to upload the file.
The validity period of the link corresponding to the file upload address is 60 minutes. Within this time limit, you can use this link to perform the corresponding file upload operations. Once it exceeds 60 minutes, the link will become invalid and can no longer be used for file upload.
When docking and uploading files in the sandbox environment, it should be noted that its server is located in Singapore. When accessing it directly in China, the network is often unstable, and problems such as lagging, slow loading or being unable to access occur from time to time. In view of this, it is recommended to access it through a proxy in Singapore. This will help improve the unstable network situation and make it more convenient to use this file service.
Step 1: Obtain the file upload address During the operation, you need to provide the relevant information in the following format to obtain the file upload address: { "fileName": "fengniantest.pdf", "contentType": "application/pdf" } Please note that although the file name here is "fengniantest.pdf", the content type (contentType) is specified as "application/pdf". Ensure that the relevant parameters are accurate.
Step 2: Add request header information when directly uploading the file When performing a direct file upload operation, you need to add the information 'Content-Type: application/pdf' to the request headers (headers) to clarify the type of the uploaded file and ensure the smooth progress of the direct file upload operation.
The following file formats are supported: PDF (.pdf), Word (.docx,.doc), RTF (.rtf), Excel (.xlsx,.xls), PowerPoint (.pptx,.ppt), WPS Writer (.wps), WPS Spreadsheets (.et), WPS Presentation (.dps), JPEG (.jpeg,.jpg), PNG (.png), BMP (.bmp), TIFF (.tiff), GIF (.gif), HTML (.html,.htm) and CSV (.csv).