Download the PHP package fzsatti/zotyos-ajax-file-uploader without Composer

On this page you can find all versions of the php package fzsatti/zotyos-ajax-file-uploader. 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 zotyos-ajax-file-uploader

Ajax File Uploader

This package is offering you a more convient way to manage file uploads.

If you are building a normal site(AJAX is used only in few cases), handling file uploads alongside other inputs in the form is a bit tricky.

problem 1.

If the validation fails, normally you would redirect back the user to the form so he can correct the data for submiting again. This means the user has to find that file on his filesystem each time.

problem 2.

The other tricky thing is when you want to edit a resource wich has file. If the user leaves the file input empty you have to implement some logic to decide whether the user want to remove the file or just leave it unchanged.

This package is offering a solution for such cases.

How it works

Submitting your form would need an anterior request for actually uploading the file

  1. First you upload the file with an AJAX request in a separate form. If the upload succeeded, the response will contain the ID of the file and it's URL(ex. if you want preview in IE7)
  2. Then you just have to attach the ID of the file to your original form(probably in a hidden input)
  3. The users submits your original form, and you process the form. The file is already located on the server so you just handle it's ID.

Yes, in your database you only need to save the file's ID (the column should be 40 char long string). The path, url and other descriptive informations of the file will be accessible once you instantiated the Zotyo\AjaxFileUploader\File object. Details of the file from the client's machine are also accessible. Each time you upload a file, a .json file will be also generated for storing client side informations. By default these .json files won't be accessible trough your webserver.

Pros

Cons

Validation file-uploaded-in-current-session ships with the package. Use this validation against hackers who would change the file's ID.

Installation

Add the following line to you composer.json

After downloading the package, add PackageServiceProvider to the providers array of your config/app.php

Finally you should publish the config & assets of the package.

This will create a file-uploader.php in your config directory.

TODO


All versions of zotyos-ajax-file-uploader with dependencies

PHP Build Version
Package Version
Requires ramsey/uuid Version ^3.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 fzsatti/zotyos-ajax-file-uploader contains the following files

Loading the files please wait ....