如何将图像从本地存储上传到cloudinary



在laravel 8应用程序中,我需要将图像从本地存储上传到cloudinary(使用cloudinary laravel 1.0(

并查看描述:

// Store the uploaded file in the "lambogini" directory on Cloudinary with the filename "prosper"
$result = $request->file->storeOnCloudinaryAs('lambogini', 'prosper');

如何将我的存储路径转换为上传的请求($request->文件(?上传的请求似乎是显而易见的项目,它可以与这个库的方法一起工作?

谢谢!

如果你的存储中已经有文件,你可以用以下方法上传:

$uploadedFileUrl = Cloudinary::upload('path/to/your/image.jpg')->getSecurePath();

最新更新