Laravel文件管理器在尝试将图像上传到服务器时显示[对象对象]。

huangapple go评论52阅读模式
英文:

Laravel file manager says [ object object ] when trying to upload the image to the server

问题

我正在使用Laravel文件管理器将图片上传到服务器。在本地环境中一切正常,但在服务器上始终显示[object object]以及空白图片。但图片确实已上传。

此外,还出现了一个警告消息,显示"required imgick or gd extension"。

Laravel文件管理器在尝试将图像上传到服务器时显示[对象对象]。

代码

<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"

Laravel文件管理器在尝试将图像上传到服务器时显示[对象对象]。

code

&lt;div class=&quot;input-group&quot;&gt;
                                            &lt;span class=&quot;input-group-btn&quot;&gt;
                                                &lt;a id=&quot;image&quot; data-input=&quot;thumbnail&quot; data-preview=&quot;holder&quot;
                                                    class=&quot;btn btn-primary&quot;&gt;
                                                    &lt;i class=&quot;fa fa-picture-o&quot;&gt;&lt;/i&gt; Choose
                                                &lt;/a&gt;
                                            &lt;/span&gt;
                                            &lt;input id=&quot;thumbnail&quot; class=&quot;form-control&quot; type=&quot;text&quot; name=&quot;thumbnail_image&quot;&gt;
                                        &lt;/div&gt;
$(&#39;#image&#39;).filemanager(&#39;image&#39;);

答案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.

huangapple
  • 本文由 发表于 2023年6月26日 13:30:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76553741.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定