Download the PHP package 3xw/attachment without Composer

On this page you can find all versions of the php package 3xw/attachment. 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 attachment

this project as moved!

Please use 3xw/cakephp-attachment instead!!

Attachment plugin for CakePHP ^3.7

Attachment plugin solves common problems with media, files and embed data. The goal is to store files where you want ( Dropbox, AWS S3, ... ) and keep a record of it in a table.

Attachment offers both storage layer and database layer as well as frontend and backend solutions for common needs.

It uses CakePHP 3, Flysystem and Intervention Image

Installation

Installation.composer

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

Installation.load

In src/Application.php

Alternatively you can overload with your own settings (config/attachment.php):

Installation.db

a sql file can found at path:

Installation.folders

Create a thumbnails folder with appropriate chmod to enable php to write in it...

If you store your files locally, then create a folder according to default settings or your own. For default set as follow:

BackendDependencies

BackendDependencies.libs

In order to use backend tools you need to have following libs installed:

javascript:

css:

BackendDependencies.html

Vuejs components are nested to a top parent you need to setup. It requires one extra block (template). Following is easy to achieve.

in your layout.ctp:

BackendDependencies.js

in your app.js

Settings

Default settings are present at following path: vendor/3xw/attachment/config/attachment.php

feel free to write your own at following path: config/attachment.php

Exemple of settings:

Settings.profiles

You can set up your profiles according to Flysystem doc just add baseUrl in order to retrieve full urls. Profiles are stored by name. So you can split your file in sevral systems.

Attachment comes prepact with three default settings:

default // Local file system stored in webroot/files
external // used for external urls
cache // for thumbs creations

following is the default adptater for local storage:

So you can use your own or install new one with composer.

Settings.upload

The upload is made before saving a realted records. global settings are setup under Attachment.upload. You can set global behaviors and then override them local in add.ctp or edit.ctp. Sevral options are avaliable here:

Restrictions are behaviors used in backend to sort files.

Settings.listeners

Listeners are Events Handlers that are executed once their relative event is triggered. You can set handlers for a genral purpose in the attachment config file, or you can add the 'lsiteners' key to setting arrays of any Attachment Helper functions with CRUD ability.

Events triggered list is:

Listners should extend the BaseListener class:

Settings.thumbnails

Attachment.thumbnails is the settings for thumbs generation.

This settings are global and restirct local changes in order to keep logic of thumb in one file and limit extra formats. each table are possibility you allow. So only 600px and 1200px thumbs are allowed. Only crop of 4:3 and 16:9 are allowed.

Usage

Usage.model

Attachment is two tables: Attachments and Atags. So you can bind any of your models with, all relations types are supported.

Attachment handles an 'order' field as well. So feel free to add such a field in your HABTM join tables...

Usage.controller

Simply use contain or any join you need...

Usage.view

All skills are in the Helper Attachment. So first of All add it into your AppView.

in src/View/AppView.php

Usage.view.backend

In add.ctp

In edit.ctp

Global Attachments index :
TinyMCE Plugin

Attachment comes with a TinyMCE plugin. Working with package cakephp-tinymce

This will let you insert image right into trumbowyg textarea !!! heepee!

Exemple in locale.ctp:

Usage.view.frontend

in file

Url Only

Usage.view.download

Usage.shell

1) Attachment plugin provides a usefull shell script to retrieve width and height of images

2) CReate missing attachment transaltions for loacle:


All versions of attachment with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.16
cakephp/cakephp Version ~3.3
friendsofcake/crud Version ^5.0
friendsofcake/search Version ^5.1
wyrihaximus/fly-pie Version ^1.1
league/flysystem-aws-s3-v3 Version ^1.0
intervention/image Version ^2.3
cakephp/migrations Version @stable
firebase/php-jwt Version ^5.0
3xw/cakephp-utils Version ^3.6
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 3xw/attachment contains the following files

Loading the files please wait ....