Giter VIP home page Giter VIP logo

kaltura / chunked-file-upload-jquery Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 7.0 57 KB

Based on blueimp/jQuery-File-Upload library, this upload widget provides JavaScript based chunked upload with pause-and-resume and automatic optimization of file chunk size. Use this widget to implement a Kaltura file upload workflow in your web based applications.

License: MIT License

CSS 25.85% PHP 16.29% JavaScript 57.86%

chunked-file-upload-jquery's People

Contributors

tzubeli avatar zoharbabin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chunked-file-upload-jquery's Issues

Content-Range is not allowed by Access-Control-Allow-Headers in preflight response

Hi!
I am constantly getting error related to CORS headers:
XMLHttpRequest cannot load https://www.kaltura.com/api_v3/?(...). Request header field Content-Range is not allowed by Access-Control-Allow-Headers in preflight response.

Here is my preflight OPTIONS request:

Accept:*/*
Accept-Encoding:gzip, deflate, sdch, br
Accept-Language:pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
Access-Control-Request-Headers:content-disposition, content-range
Access-Control-Request-Method:POST
Connection:keep-alive
Host:www.kaltura.com
Origin:http://localhost:50053
Referer:http://localhost:50053/Resources/Create
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36

and response:

Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept, Range, Cache-Control
Access-Control-Allow-Methods:POST, GET, HEAD, OPTIONS
Access-Control-Allow-Origin:*
Access-Control-Expose-Headers:Server, Content-Length, Content-Range, Date
Connection:Keep-Alive
Content-Encoding:gzip
Content-Length:20
Content-Type:text/html
Date:Wed, 15 Mar 2017 13:33:21 GMT
Keep-Alive:timeout=5, max=100
Server:Apache
Vary:Accept-Encoding
X-Me:ny-front-api39

There is Content-Range header in Access-Control-Expose-Headers so why my browser stops me from POSTing next XHR's?

I am running this simple js code:

    function InjectKalturaFileUploadNEW() {
        $('input[name="fileData"]').fileupload({
            apiURL: 'https://www.kaltura.com/api_v3/',
            url: 'https://www.kaltura.com/api_v3/?service=uploadToken&action=upload&format=1',
            ks: kalturaSession,
            singleFileUploads: true,
            dataType: 'json',
            autoUpload: true,
            maxChunkSize: 400000,
            submit: function (e, data) {
                console.log('submit fired')
            },
            done: function (e, data) {
                console.log('done fired')
            },

        }).on('fileuploaddone', function (e, data) {
            console.log('fileuploaddone fired.')
        }).on('fileuploadchunkdone', function (e, data) {
            console.log('chunkdone fired.')
        });
    }

Thanks!

drag and drop not working

Drag and drop option which is enabled by default in blueimp upload is not working.
The file seems to start uploading according to the console logs but no progress is shown and
no upload done event is being fired.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.