Download the PHP package serosensa/user-image-handling without Composer

On this page you can find all versions of the php package serosensa/user-image-handling. 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 user-image-handling

This package is incomplete

Installation

Usage & Functionality

Default Behaviour

Image Upload

Use the file-upload-fetch component, posting to fetch-image-upload and using UserImageController@fetchImageUpload Component receives json of file data including location and emits event file-upload to its parent //TODO use v-model to pass this nicely It is the responsibility of the parent to catch this event and use the data as appropriate (eg creating a database record)

Saving an image record

Pass the fileData generated by file-upload-fetch to ImageService@saveImageRecords; Will save image records to the default UploadedImages table (see further info in this readme). You may pass a model name (eg Article) to tie the image to a specific related model in the database.

Upload and save record

The method UserImageController@fetchImageUploadAndRecord handles both these steps by combining the functionality above. Simply create a route to this method and set the post-url on file-upload-fetch to this route.

Upload an Image (Async)

Upload a file and receive json which can be used to request the image from the server

Upload an Image (Post) (Not full tested)

Save / Store an Image Record

ImageService Methods

ImageService@imageUpload

params

ImageService@fetchImageUpload

Uses ImageService@imageUpload - same params Validates the image(s) Returns json of file data (TODO handle multiple files per field)

ImageService@saveImageRecords

//TODO not tested Saves image records to the default UploadedImages table. params

ImageService@imageEditorSave

Processes the data sent by the image-editor component params

Image Storage and Retreival

Default UploadedImages table

//TODO - have to manually copy the migration, not working in package Stores a record of image data Used by ImageService@saveImageRecords Optionally related to a parent model and id - this can be used to retrieve images from the table, eg by calling UploadedImage::where(parent_model, 'article') or UploadedImage::where('parent_model', 'article')->where('parent_id', $parentId) Alternatively, store the id from this table in a pivot table to be accessed by any other model as required. It is also

Required fields

Default UploadedImages model

Extend this model to add any additional functionality required - class MyUploadedImageModel extends Serosensa\UserImage\UploadedImage. Sets dates and guarded on created_at and updated_at fields

Display / Edit Existing Images

Image-display Component

Image-editor Component

Image Editor Categories

To display a category selector within the imageEditor:

Field-errors Component


Fuller details

//TODO - some of this is superceeded by the above / needs updating

JS files (vue / general frontend)

Styling

Icons

Image Uploads - via ImageService

File Destinations / Writeable folders

Folders in which uploaded files are to be saved must be writeable. To do this, chmhod -R 777 public/foldername

Image Upload forms

Default Field names - one file upload field only

Custom Field names - one or more file upload fields

Image Upload in Controller

ImageService@imageUpload Functionality

Image Rotation


TODO


Useful References


All versions of user-image-handling with dependencies

PHP Build Version
Package Version
Requires intervention/image Version ^2.4
php Version >=5.4.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 serosensa/user-image-handling contains the following files

Loading the files please wait ....