The background uses El upload to complete the upload. Sometimes it is found that the upload cannot succeed and will be redirected to the login page.
The check found that the URL request did not add a cookie request, and the cookie was missing, so the verification could not be completed.
The default request of El upload component is without cookie
set the attribute with credentials to true. It supports sending cookie credential information (: with credentials =’true ‘)
If you follow the above method, the problem still exists, which may be caused by the existence of a virtual directory on your website.
The URL address assigned to the action of El upload must be the complete root directory path (/ virtual directory name/uploaded URL address)
It is emphasized here that the virtual directory name should be the same as the virtual directory name when you store cookies. It is recommended to keep the case consistent
<el-upload class="upload-demo" ref="upload" :action="action_url" name="file" :with-credentials='true' :limit="1" :file-list="fileList" :auto-upload="false"> <el-button size="small" type="primary">choose the files</el-button> <div slot="tip" class="el-upload__tip"></div> </el-upload>
- PHP: POST Content-Length of xxx bytes exceeds the limit of 8388608 bytes
- Files Upload Error: err_cert_common_name_invalid [How to Solve]
- Node uses SSH2 SFTP Client to upload and download FTP files
- Axios gets the upload progress error: xhr.upload.addEventListener is not a function
- Error reported under webuploader IE9 [How to Fix]
- [Solved] Spring Boot Error: The field file exceeds its maximum permitted size of 1048576 bytes
- unzip error “End-of-central-directory signature not found”
- How to Add a Upload Files Function with Cypress
- [Node.js] fs.renameSync() Error: Error: ENOENT: no such file or directory, rename…
- Net:: err_ CONTENT_ LENGTH_ Mismatch error, nginx configuration is correct