1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    m4dc4p will become famous soon enough

      0  

    Default Simple File Uploader - components to upload files

    Simple File Uploader - components to upload files


    I've created a set of components and some samples that allow you to upload files using drag and drop and which will give progress notifications as the files upload.(*)

    I didn't build a really nice UI for uploading - but what I've done will let you build the sweet UI you would like to have.

    Check out the code and a sample at http://uploader.codeslower.com/. Feedback here or on GitHub (https://github.com/m4dc4p/uploader) is greatly appreciated.

    Let me emphasize again that I'm not interested in improving the sample UI; I am more interested in improving the underlying components to **make** a great UI.

    Thanks!

    (*) Of course, IE doesn't support any of the interfaces to make this work, so the UI will fall back to the plain old file-picker.

  2. #2
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,071
    Vote Rating
    40
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    This looks like something I could use. Nice job.
    Senior Technical Training & Mentoring

    Teahouse Training Company
    Asia Pacific Region (Official Certified Sencha Trainer)

    Check out SenchaWorld.com - The best bits from the Sencha community (videos, blogs, etc)

    Code Validation : JSLint | JSONLint | JSONPLint

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    35
    Vote Rating
    0
    r.vanelk is on a distinguished road

      0  

    Default


    Nice job! Very good plugin!

    How can i get the file in the AJAX call? The POST and the FILES var are empty...

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    m4dc4p will become famous soon enough

      0  

    Default


    The file is in the request body, as a stream of raw bytes. Fiddler (or Firebug, etc.) will show you what the browser submits.

    What are you using the server side - PHP? I haven't actually tried that yet ... Let me know if you get it working. Patches also welcome

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Location
    The Netherlands
    Posts
    194
    Vote Rating
    0
    nicobarten is an unknown quantity at this point

      0  

    Default


    This is indeed something many ExtJS developers can use!

    Thank you very much for this awesome plugin.

    Btw, i use the MVC system of ExtJS, so i put all my events under controllers. Is it also possible to use the events 'success', 'failure' and 'callback' in a controller?

    Also, in the 'failure' event i want to access the current Cs.file.ui.FileItem object... to set the text in red of that file. How can i access that object?

  6. #6
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    m4dc4p will become famous soon enough

      0  

    Default


    Quote Originally Posted by nicobarten View Post
    Btw, i use the MVC system of ExtJS, so i put all my events under controllers. Is it also possible to use the events 'success', 'failure' and 'callback' in a controller?
    I haven't used MVC myself so I'm not sure how to do it exactly, but I am positive there is a way. I would expect you can set up handlers for the three uploader events, which will in turn fire controller events.

    Quote Originally Posted by nicobarten View Post
    Also, in the 'failure' event i want to access the current Cs.file.ui.FileItem object... to set the text in red of that file. How can i access that object?
    I didn't expose it. SimpleFileUploader isn't meant to be extensible. I intended people to create their own UI using the File Uploader components.

    Let me know how it works out for - glad it can be useful.

  7. #7
    Sencha User
    Join Date
    Aug 2011
    Posts
    35
    Vote Rating
    0
    r.vanelk is on a distinguished road

      0  

    Default


    How can i change the background color of the upload progress bar?

    I add a class to the ProgressBar in the file 'fileItem.js'.

    Code:
    cls: 'the_class',
    
    .the_class
    {
        background-color: #456D9F !important;
    }
    Now is the upload bar a few seconds #456D9F and then the color changed to the standard color of the Extjs theme.

  8. #8
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    m4dc4p will become famous soon enough

      0  

    Default


    Quote Originally Posted by r.vanelk View Post
    How can i change the background color of the upload progress bar?

    I add a class to the ProgressBar in the file 'fileItem.js'.
    I didn't design the sample UI to be very flexible, so I don't think you can do that. You'd have more luck creating your own UI.

    Out of curiosity, what are you using the uploader for?

  9. #9
    Sencha User
    Join Date
    Jul 2007
    Location
    Germany
    Posts
    55
    Vote Rating
    0
    rednix is on a distinguished road

      0  

    Default


    Added the following code to work with latest Ext JS 4.1.1:
    Code:
        if (!me.hasListeners) {
            me.hasListeners = new me.HasListeners();
        }
    in constructor of class Cs.file.data.FileManager right before
    Code:
    me.addEvents(

  10. #10
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33
    Vote Rating
    0
    m4dc4p will become famous soon enough

      0  

    Default


    Thanks! I made the suggested change.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar