Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example of free-pic free drawing bed for composer package

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the composer package of free-pic free bed example, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Free-pic free drawing bed

Experience demo (http://free-pic.hzz.cool/upload.html)

Github address (https://github.com/hezhizheng/free-pic)

Packagist address (https://packagist.org/packages/hzz/free-pic)

Feature

(3) No image bed (no storage limit | No upload credential | No homology cross-domain detection)

Support for the use of agents, easy to use, easy to extend

Supports "gif", "jpeg", "jpg" and "png" image formats

Support drawing bed

Https://sm.ms/

Https://imgkr.com/

Https://imgbb.com/upload

... Find the other three non-drawing beds and expand them again.

Use

Download and install

Composer require "hzz/free-pic @ dev"

Upload pictures to the local area

.. use Hzz\ File;// upload an image locally, or you can use other upload classes. The absolute path to get the image is $fileEntity = File::singleton (). / / $field_name the field name of the uploaded image defaults to file// $dir. Default is'$filepath = $fileEntity- > upload ($field_name,$dir).

Upload pictures to a third-party picture bed

/ / implement classes through different initialization types / / support parameter types (img_kr, sm, img_bb) $serve = FreePic::create ('img_kr'); / / $serve- > proxy =' http://127.0.0.1:58591'; / / set proxies on demand. Sm.ms may require fq$url = $serve- > upload ($filepath) in mobile networks.

Delete a local picture

$fileEntity- > delete ($filepath); Thank you for reading this article carefully. I hope the article "the example of free free-pic drawing bed of composer package" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report