-
20 Sep 2011 3:14 PM #1
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.
-
21 Sep 2011 8:12 AM #2Sencha - Sales Team
- Join Date
- Mar 2007
- Location
- Melbourne, Australia (aka GMT+10)
- Posts
- 738
- Vote Rating
- 6
This looks like something I could use. Nice job.
Check out SenchaWorld.com for articles, screencasts, conference videos and more.
Sencha Technical Training : Asia Pacific Region
Code Validation : JSLint | JSONLint | JSONPLint
-
6 Oct 2011 6:28 AM #3
Nice job! Very good plugin!
How can i get the file in the AJAX call? The POST and the FILES var are empty...
-
6 Oct 2011 7:21 AM #4
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
-
14 Oct 2011 5:24 AM #5
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?
-
14 Oct 2011 7:37 AM #6
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.
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.
-
26 Oct 2011 12:18 AM #7
How can i change the background color of the upload progress bar?
I add a class to the ProgressBar in the file 'fileItem.js'.
Now is the upload bar a few seconds #456D9F and then the color changed to the standard color of the Extjs theme.Code:cls: 'the_class', .the_class { background-color: #456D9F !important; }
-
26 Oct 2011 9:16 AM #8
-
4 Dec 2012 5:08 AM #9
Added the following code to work with latest Ext JS 4.1.1:
in constructor of class Cs.file.data.FileManager right beforeCode:if (!me.hasListeners) { me.hasListeners = new me.HasListeners(); }Code:me.addEvents(
-
4 Dec 2012 8:24 AM #10
Thanks! I made the suggested change.


Reply With Quote



