首页 > 解决方案 > 如果使用 auth:api 中间件,为什么我无法在我的 Vue laravel 应用程序上上传文件数据。如果中间件被转义,则上传文件

问题描述

我的本地开发工具:使用 Laragon 作为本地服务器。使用 PhpStorm 数据库:Mysql。 Jwt 身份验证:护照。 我的前端应用程序 vue 与后端 laravel 是分开的。我正在使用 axios 将表单数据从我的 vue 应用程序发送到 laravel 应用程序。我还设置了 Content-type Multipart/form-data。

这是我的日志文件

我正在使用 laragon 进行本地开发 2021-03-04 13:49:13] local.ERROR:无法打开文件。{"exception":"[object] (RuntimeException(code: 0): 该文件无法打开。在 I:\laragon\www\AuthenticationUsingPassport\vendor
yholm\psr7\src\Factory\Psr17Factory.php:46) [stacktrace ]

这个问题详细说明了问题:Failed image upload Laravel and Windows Server 2019 but its on windows server。

标签: laravelvue.jslaravel-passport

解决方案


推荐阅读