Download the PHP package gdshenrun/caiss-file without Composer

On this page you can find all versions of the php package gdshenrun/caiss-file. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package caiss-file

caiss-file

caiss-file

UploadRepository的安装 :

composer require gdshenrun/caiss-file

思路 :

(1). 存储: 腾讯云的COS, 创建两个bucket, 一个权限是 私有读写, 另一个权限是 公有读, 私有写; 各自独立的加速域名;

(2). 数据库: 只保存URL的路径 userHead/puvYvI7bNVPOVlIbndFc.jpg

(3). 渲染时: 拼接 加速域名 https://{bucket名称}.file.myqcloud.com/

(4). 最终完整链接 https://{bucket名称}.file.myqcloud.com/ + {文件对象Key} + "私有bucket的鉴权参数"

(5). 富文本: 加速域名 使用 占位符 _CDNDOMAIN 存储 和 渲染替换;

(6). 私有bucket 设置 "临时URL" 的有效期为 300秒, 超时则返回 http_status 403;

代码示例:

返回结果

API:

(1). 递归遍历文件夹,返回树形结构

$dir = config("myqcloud.userHeadDir");

$uploadRepository->cmdList($bucketName, $dir);

(2). 列出文件夹的 文件列表和子文件夹列表(等价于dir,ll,ls命令)

$uploadRepository->cmdList($bucketName, $dir);

(3) 删除文件夹

$uploadRepository->cmdDeleteDir($bucketName, $dir);

(4) 删除文件

$uploadRepository->cmdDeleteObjects($bucketName, $dir);

(5) 复制文件

$uploadRepository->cmdCopyFile($srcBucketName, $srcKey, $destBucketName, $destKey);

(6) 移动文件 / 文件重命名

$uploadRepository->cmdRenameFile($srcBucketName, $srcKey, $destBucketName, $destKey);

(7) 创建文件夹

$uploadRepository->cmdCreateDir($bucketName, $dirname);

(8) 上传base64图片

$uploadRepository->uploadBase64Img(string $bucketName, string $directory, string $base64Img)

(9) 上传单个文件

$uploadRepository->uploadFile(string $bucketName, string $directory, string $extension, string $localFilePath)

(10) 私有文件 生成临时链接

$uploadRepository->getTempUrl(string $bucketName, string $objectKey)

(11) 公共文件 生成访问链接

$uploadRepository->getUrl(string $bucketName, string $objectKey)

All versions of caiss-file with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-json Version *
ext-curl Version *
qcloud/cos-sdk-v5 Version 2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gdshenrun/caiss-file contains the following files

Loading the files please wait ....