英文:
Laravel file manager says [ object object ] when trying to upload the image to the server
问题
我正在使用Laravel文件管理器将图片上传到服务器。在本地环境中一切正常,但在服务器上始终显示[object object]以及空白图片。但图片确实已上传。
此外,还出现了一个警告消息,显示"required imgick or gd extension"。
代码
<div class="input-group">
<span class="input-group-btn">
<a id="image" data-input="thumbnail" data-preview="holder" class="btn btn-primary">
<i class="fa fa-picture-o"></i> 选择
</a>
</span>
<input id="thumbnail" class="form-control" type="text" name="thumbnail_image">
</div>
$('#image').filemanager('image');
英文:
I am using a laravel file manager for uploading an images to the server. In local everything works file but when in the server it always shows [ object object ] with blank images. But it gets uploaded.
Also, there was a warning message showing "required imgick or gd extension"
code
<div class="input-group">
<span class="input-group-btn">
<a id="image" data-input="thumbnail" data-preview="holder"
class="btn btn-primary">
<i class="fa fa-picture-o"></i> Choose
</a>
</span>
<input id="thumbnail" class="form-control" type="text" name="thumbnail_image">
</div>
$('#image').filemanager('image');
答案1
得分: 0
要启用gd扩展,请查看以下链接:
https://stackoverflow.com/questions/2283199/enabling-installing-gd-extension-without-gd
如果错误仍然存在:
请检查/config目录下的lfm.php文件并检查大小配置。
还可以尝试更改php上传大小和post大小。
您应该能够在开发工具中检查此错误。
英文:
To enable gd extension check this:
https://stackoverflow.com/questions/2283199/enabling-installing-gd-extension-without-gd
If Error still persists:
Check lfm.php in /config and check size configuration.
Also Try changing php upload size and post size.
You should be able to check errors for this in dev tools.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论