Download the PHP package tinywan/storage without Composer

On this page you can find all versions of the php package tinywan/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 storage

webman 简单易用多文件上传插件

Latest Stable Version Total Downloads Daily Downloads Latest Unstable Version License PHP Version Require [last-commit]() [storage tag]()

特性

云端 多文件上传 Base64图片上传 服务器文件上传
🍏 私有云 --
🍓 阿里云
🍋 腾讯云
🍇 七牛云
🍇 亚马逊(S3)

安装

基本用法

v1.0.0 版本之后不需要调用此方法Tinywan\Storage\Storage::config() 初始化,会自动初始化,默认为配置文件app.php默认配置default配置上传适配器。

上传成功信息

失败,抛出StorageAdapterException异常

成功响应字段

字段 描述 示例值
key 上传文件key webman
origin_name 原始文件名 常用编程软件和工具.xlsx
save_name 保存文件名 03414c9bdaf7a38148742c87b96b8167.xlsx
save_path 文件保存路径(相对) /var/www/webman-admin/runtime/storage/03414c9bdaf7a38148742c87b96b8167.xlsx
url url访问路径 /storage/03414c9bdaf7a38148742c87b96b8167.xlsx
unique_id uniqid 03414c9bdaf7a38148742c87b96b8167
size 文件大小 15050(字节)
mime_type 文件类型 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
extension 文件扩展名 xlsx

上传规则

默认情况下是上传到本地服务器,会在runtime/storage目录下面生成以当前日期为子目录,以文件流的sha1编码为文件名的文件,例如上面生成的文件名可能是:

如果你希望上传的文件是可以直接访问或者下载的话,可以使用public存储方式。

你可以在config/plugin/tinywan/storage/app.php配置文件中配置上传根目录,例如:

浏览器访问:http://127.0.0.1:8787/storage/fd2d472da56c71a6da0a5251f5e1b586.png

上传验证

支持使用验证类对上传文件的验证,包括文件大小、文件类型和后缀

字段 描述 示例值
single_limit 单个文件的大小限制,默认200M 1024 1024 200
total_limit 所有文件的大小限制,默认200M 1024 1024 200
nums 文件数量限制,默认10 10
include 被允许的文件类型列表 ['xlsx','pdf']
exclude 不被允许的文件类型列表 ['png','jpg']

支持上传SDK

阿里云对象存储

腾讯云对象存储

七牛云云对象存储

亚马逊(S3)对象存储

上传Base64图片

使用场景: 前端直接截图(头像、Canvas等)一个Base64数据流的图片直接上传到云端

请求参数

请求案例(阿里云)

v1.0.0 版本之后不需要调用此方法Tinywan\Storage\Storage::config() 初始化,会自动初始化,默认为配置文件app.php默认配置default配置上传适配器。

响应参数

上传服务端文件

使用场景: 服务端导出文件需要上传到云端存储,或者零时下载文件存储。

请求案例(阿里云)

v1.0.0 版本之后不需要调用此方法Tinywan\Storage\Storage::config() 初始化,会自动初始化,默认为配置文件app.php默认配置default配置上传适配器。

响应参数

Other

phpstan


All versions of storage with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
workerman/webman-framework Version ^1.2.1
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 tinywan/storage contains the following files

Loading the files please wait ....