Download the PHP package quansitech/qscmf-formitem-object-storage without Composer

On this page you can find all versions of the php package quansitech/qscmf-formitem-object-storage. 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 qscmf-formitem-object-storage

qscmf-formitem-object-storage

上传文件至云服务商的一体化组件

安装

特性

  1. 支持上传至不同供应商
  2. 支持文件查重,避免重复上传同一个文件

替换 oss/cos 上传组件用法

使用

支持组件

ColumnItem
FormItem

自定义组件用法

此扩展包使用的是直传功能,主要分为以下步骤:

  1. 服务端实现签名,返回请求的路径等信息
  2. 客户端发起POST请求,直传文件到云服务商。
参考文档
名称 供应商
aliyun_oss 阿里云-服务端签名直传
tengxun_cos 腾讯云-Web 端直传实践
volcengine_tos 火山引擎 PostObject 和 Post 表单预签名
用法
  1. 向服务端请求 policy 等信息

    接口地址:/extends/objectStorage/policyGet

    请求方法

    GET

    请求参数

    参数 是否必选 类型 说明
    type 是 string 与 upload_config.php 中 UPLOAD_TYPE_XXX 的 XXX 对应,如图片 image;文件 file
    vendor_type 否 string 供应商名称
    title 是 string 文件标题
    hash_id 否 string 文件 MD5 信息,可用于查重
    file_type 是 string 文件 mime-type 类型,例如 image/png
    jump 否 string 为0则不使用腾讯云的重定向功能,仅 vendor_type 为 tengxun_cos有效

    返回示例

    正常
    • 提交了 hash_id 且已存在文件,则直接返回文件信息

    • 返回不同供应商接口所需参数

      • aliyun_oss

      • tengxun_cos

      jump 为 0

      • volcengine_tos
    异常

    以接口实际返回值为准

  2. 使用 Post 方法向云服务商发送文件上传请求

    • aliyun_oss

      • 请求地址为步骤1返回的 host
      • 按照官方文档组装表单字段
    • tengxun_cos

      • 请求地址为步骤1返回的 url
      • 按照官方文档组装表单字段
    • volcengine_tos

      • 请求地址为步骤1返回的 url
      • formData 需与步骤1返回的 params 一致
    1. 返回示例

      正常
      • 上传成功
      异常

      以接口实际返回值为准

类使用说明

FormItem\ObjectStorage\Lib\Common 帮助函数类使用说明

FormItem\ObjectStorage\Lib\Context 供应商生成类使用说明

FormItem\ObjectStorage\Lib\Vendor 供应商类使用说明

服务端上传文件

用法
配置说明

os_uploader 上传图片

介绍

图片裁剪上传功能,内置cropper.js,可配置是否裁剪。

功能:

  1. 回调说明:

    • beforeUpload : 当选中文件时的回调。若返回false,则不添加选中的文件
    • filePerUploaded : 每个文件上传完成,都会触发此回调
    • uploadCompleted : 若多选上传选中3个图,则3个图完成上传才触发此回调
    • uploadError : 上传出错
    • deleteFile : 删除图片

osHooks

介绍

上传到云服务商js帮助类的钩子

钩子说明

Antd-admin富文本使用

自定义回调地址

.env 文件中加入配置项 OBJECT_STORAGE_CALLBACK_URL,如:OBJECT_STORAGE_CALLBACK_URL=http://your_domain.com/extends/ObjectStorage/callBack


All versions of qscmf-formitem-object-storage with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3.0
tiderjian/think-core Version ^15.2.0
aliyuncs/oss-sdk-php Version ^2.0
volcengine/volc-sdk-php Version ^1.0
qcloud/cos-sdk-v5 Version >=2.0
alibabacloud/sts-20150401 Version ^1.0
quansitech/ve-tos-php-sdk Version ^1.0
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 quansitech/qscmf-formitem-object-storage contains the following files

Loading the files please wait ...