Comments (10)
你追踪下文件存放,找找问题所在。controller中返回的是临时文件,表单提交后复制临时文件到长久保存目录,所以是在Cropping.php中进行
from dcat-cropper.
跟踪过了,报错的原因
Storage::disk(config('admin.upload.disk'))->putFile('weiwait/cropper', $request->file('file'));
是直接提交到云存储
但是
$cached = $storage->get($file);
这里没有带域名,是 weiwait/cropper/...image
所以报错。
from dcat-cropper.
跟踪过了,报错的原因 Storage::disk(config('admin.upload.disk'))->putFile('weiwait/cropper', $request->file('file')); 是直接提交到云存储 但是 $cached = $storage->get($file); 这里没有带域名,是 weiwait/cropper/...image 所以报错。
你的admin的上传配置是怎么样的
from dcat-cropper.
admin.php 配置是上传云的。所以 CroppingController.php 中直接上传到云存储,prepareInputValue() 函数应该都不用复写了。不过我本地没发现调用 CroppingController.php ,还是BASE64,但服务器是直接调用了。
from dcat-cropper.
你测试过了本地可以?
from dcat-cropper.
我没有看前端代码,觉得裁切后,直接AJAX调用 CroppingController.php 上传,返回文件地址后就无需任何处理了。我现在本地走的
if (preg_match('/^(data:\s*image/(\w+);base64,)/', $file, $result)){
服务器值是云存储的地址,就没有做任何处理 (else的代码删掉了)
from dcat-cropper.
我没有看前端代码,觉得裁切后,直接AJAX调用 CroppingController.php 上传,返回文件地址后就无需任何处理了。我现在本地走的 if (preg_match('/^(data:\s*image/(\w+);base64,)/', $file, $result)){
服务器值是云存储的地址,就没有做任何处理 (else的代码删掉了)
刚才是了下,云存储也没有问题
from dcat-cropper.
我没有看前端代码,觉得裁切后,直接AJAX调用 CroppingController.php 上传,返回文件地址后就无需任何处理了。我现在本地走的 if (preg_match('/^(data:\s*image/(\w+);base64,)/', $file, $result)){
服务器值是云存储的地址,就没有做任何处理 (else的代码删掉了)
你检查下云存储的配置
from dcat-cropper.
我没有看前端代码,觉得裁切后,直接AJAX调用 CroppingController.php 上传,返回文件地址后就无需任何处理了。我现在本地走的 if (preg_match('/^(data:\s*image/(\w+);base64,)/', $file, $result)){
服务器值是云存储的地址,就没有做任何处理 (else的代码删掉了)
你有加入dcat-admin的qq或者微信的话可以在里面找我
from dcat-cropper.
一群已经满了,可加我Q 9816396 啊
from dcat-cropper.
Related Issues (7)
- 若为非必填项时报错
- 选择原图时返回为object 无法保存图片 HOT 2
- corpper js 默认裁切图片为png格式 导致图片尺寸太大,可以改成jpeg HOT 2
- Field type [cropper] does not exist. HOT 1
- 裁切后上传云存储会报路径找不到。 HOT 1
- 無法刪除上傳圖片 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcat-cropper.