【发布时间】:2020-03-02 12:49:56
【问题描述】:
在我的个人资料中,图像完美显示,但我在控制台中收到以下错误。如果我尝试从公用文件夹访问图像,它不会向我显示错误,但如果我尝试从作为子文件夹的图像文件夹访问它,则会显示错误。自从我搜索 4 天以来,任何人都可以帮助我解决这个问题解决方案,但我没有找到任何解决方案,但他会那么好。
禁止访问!您无权访问请求的 目录。没有索引文档或目录是 读保护。
如果您认为这是服务器错误,请联系网站管理员。
错误 403 admin-cms.me Apache/2.4.39 (Win64) OpenSSL/1.0.2s PHP/7.1.31
我的 API 代码是:
Route::get('profile','API\UserController@profile');
我的控制器代码是:
public function profile()
{
//
return auth('api')->user();
}
我的数据和方法代码是:
data() {
return {
users: {},
form: new Form({
id: "",
name: "",
email: "",
password: "",
type: "",
bio: "",
photo: ""
})
};
},
methods: {
getProfilePhoto() {
return "image/" + this.form.photo;
}
我在 profile.vue 中的 HTML 代码是:
<div class="widget-user-image">
<img class="img-circle" :src="getProfilePhoto()" alt="User Avatar" />
</div>
【问题讨论】:
标签: mysql laravel vue.js xampp