Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

codex-team/transport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Deprecated. Use package @codexteam/ajax instead!

codex.transport

One click file uploader

Usage

transport.init({
   url: '/ajax/transport',
   multiple: true,
   accept: 'image/*',
   data: {},
   before: function () {},
   progress: function (percentage) {
       console.log(percentage + '%');
       // ...
   },
   success: function (response) {
       console.log(response);
       // ...
   },
   error: function (response) {
       console.log(response);
       // ...
   },
   after: function () {},
});

You can handle all of this event like:

  • what should happen before data sending with XMLHTTP
  • what should after success request
  • error handler

Releases

No releases published

Packages

No packages published