Multiple file uploader - looking at Google Docs implementation - asp.net

I'm looking to implement a multiple file uploader in my ASP.NET 3.5 site.
Now, the Google Docs multi-file uploader is pretty awesome, and I'd like to create something like that. Correct me if I'm wrong, but Google Docs is not open source, so I can't get my hands on the source code for it.
Any ideas on how this is implemented, or the best way of creating a nice interactive multi-file uploader like it?

I strongly suggest you give this jquery file upload plugin a try: "uploadify". It makes it super easy to integrate such a feature.

Nice and interactive : you can build a Silverlight client to send your files to webserver. It allows to select multiple files at once.

I guess 'Zhaph - Ben Duguid' had the best answer for this one. Post it as an answer and I'll accept it!
GoogleDocs uses a combination of Flash and JS, with the bulk of the work happening in the Flash object, rather than the JS, and they heavily minify their JS to make it smaller to download, and also harder to read...

Related

Lightbox2 from photo directory

Is it possible to use the Lightbox2 script to display all photos from a given directory instead of listing each photo in the html?
This is really just a yes or no question, but please feel free to explain. I want to know if this is possible and if I should spend my time trying to figure it out. Thanks for the help.
No, Lightbox2 is written in JavaScript.
When used on a webpage, JavaScript is a client-side scripting language.
This means that the code executes on your web browser, and only has access to data the web browser makes available to it.
For more info: Client-side scripting
You need to use a server-side language (PHP, ASP.NET, etc.) to work with the server-side directories.
Here is an answer to a similar question, with a suggestion to create an index file w/ all the image file names that you could then parse with JavaScript. I don't think it would be much more efficient than manually adding img elements though.
Is there a way to return a list of all the image file names from a folder using only Javascript?

Creating an image handler in Visual Basic for Ajax file upload

I'm not asking for detailed code for this question, but rather solid direction to learn how to do it myself. There appears to be many methods and directions so just looking for a headstart from someone experienced.
I have a simple file upload control. I want it to operate as an ajax upload, no page-refresh, and if I'm understanding correctly I need http handler that grabs the image and deals with it behind the scenes.
So I need to create a custom control, a new file upload that allows me to set some properties, such as... Path for the image, prefix for three different types (I.e. thm_uniqueimagename.jpg, med_uniqueimagename.jpg, lg_uniqueimagename.jpg) and an option to either KeepOriginal="True/False".
I'd like to see a progress bar while the image is uploading as well. A fantastic example would be a post on Facebook and how you can upload an image.
Right now I'm stuck with a standard upload control that has full post-back/refresh and it's just not nearly as attractive.
I'm just now learning VB... So basically if you can say... Read this tutorial, then do this, then do this... that would be greatly helpful. Just overwhelmed with what to do first, and how to put it all together.
Platform: Windows, .net, etc.
Thank you for any advice.
If you want a better user experience, then I suggest you investigate some solutions like the following:
ASP.NET AJAX file upload
AjaxFileUpload.
Note: If you read the documentation for the ASP.NET AJAX AjaxFileUploader, it says that it requires HTML5 for the progress feedback; otherwise it shows a spinner. So if progress feedback is a necessity and you cannot fully support HTML5 in your target browsers (i.e. older versions of IE; IE6, IE7, IE8, etc.), then you should look into the options below.
Custom HTTP module
NeatUpload is a free option.
Silverlight/Flash option
SWFUpload is a free option.
Asynchronous chunking option
RadAsyncUpload - Telerik's ASP.NET AsyncUpload is a pay option, check website for pricing.

Ajax File uploader

I just wanted to ask a question about uploading files via AJAX. I have researched on the web and found many articles on doing this. I am using ASP.NET 2.0.
I am probably going to go the jQuery route on this one, but I'm still unsure, I just need some feedback. Bacause my aim is to create an admin page for my client to add new products to his site when my client wishes to, so my client wants a simple file uploader and a multiple file uploader.
The first question is which is the best AJAX File Uploader to use?
The second question is how many files can you upload via AjAX, are there limits to how much you upload with different techniques ie. using jQuery or SWFUpload or using IHTTPHandler?
I would be grateful for your feedback.
Thanks.
I actually had to do this for an item here at work. To keep things rather simple, I went old-school and used a hidden iframe to do the file transfer in the background. There may be more fancy ways, but this worked for me. Also, there's no headaches when Adobe pushes out a bad update.
It was a while ago, so I can't remember the nuts n' bolts of the top of my head, but here's an article that seems to be using the same idea:
http://www.openjs.com/articles/ajax/ajax_file_upload/
This is a subjective question, as there is no one solution fits all for your application. The right answer is the uploader that meets your business needs. Limitations, if they exist, are set per whatever component you decide to use.

Writing web forms filler/submitter with QT C++

I'm scratching my head on how to accomplish the following task: I need to write a simple web forms filler/submitter with QT C++, it does the following:
1) Loads page url
2) Fills in form fields
3) Submits the form
Sounds easy, but I'm a web developer and can't find the way how to make QT accomplish the task, I only managed to load url with QWebView object using WebKit, have no idea what to do next, how to fill in fields and submit forms. Any hints, tutorials, videos? I appreciate this.
QWebElement class does all the work, just reading through the class documentation gave me a full idea on how to accomplish my task. Thanks to eveyrone for suggestions.
The best solution would be to write the logic in JavaScript that does what you want and then inject it into the page using QWebFrame::evaluateJavaScript() after it finishes loading.
There's also another way to do this; involving the document tree traversal API that's been available in QtWebKit since 4.6: QWebElement. You'd basically process the form pretty much the same as you would do in JavaScript, except that here the API is different and more limited. It's C++ though and might be a little bit faster. I guess, this approach might be less attractive for you, given you're a web developer and probably already know JavaScript.

Alternatives to swfobject for embedding flashplayer

Does anybody know if there's a better alternative to swfobject?
I actually like swfobject, I just wanted to hear if anybody found something better.
Or maybe it is the best way.
If you do not know swfobject you can find it here:
http://code.google.com/p/swfobject/
It is the best way I know of, and I have never had a problem with it. Note that you cannot put JS in embed code for posting on some social networking sites such as Facebook. In those cases you will need to use the usual object and embed tags.
You can try ActiveContent, which is Adobe's solution for embedding flash. It's the default for flex builder, and (I believe) CS4.
You can find the source to this in the flex builder directory;
$FLEX_BUILDER_LOCATION\sdks\3.3.0\templates\client-side-detection
Generally, people prefer swfobject because of it's simplicity. But activecontent is a field-tested solution.
There are many alternatives to SWFObject, including SWF embedding code that ships with some popular JS frameworks, but none are as bulletproof as SWFObject.
Adobe is in the process of adopting SWFObject 2.x for most of its publishing products (SWFObject will replace Adobe's ActiveContent JavaScript-based solution).
BTW, If you use SWFObject's static publishing approach, your SWF will work without JavaScript being enabled. It simply won't have access to Adobe's ExpressInstall utility. See http://code.google.com/p/swfobject/wiki/documentation#Should_I_use_the_static_or_dynamic_publishing_method?
You don't even need to download SWFObject if you use Google's Ajax API repository :)
SWFObject 2. The best way to get your flash movie seen by as many people as possible. (Except those with JavaScript turned off!)
There's a nice "wrapper" for swfobject called "EasySWF". They're using swfobject, but just made it much easier to understand/implement.
From their documentation adding an SWF is as easy as:
easyswf({swf: "path/to/the.swf", width:400, height:100});
Here's the address:
http://www.gieson.com/Library/projects/utilities/easyswf/
Looks like they're using it throughout their site as well?

Resources