2. Agenda
What we will talk about:
• How to upload files to the server
• Java security model. Escape from the sandbox
• POST-requests. Chunked or fixed-length?
• Multi threaded applet VS single threaded JS
5. HTML4. Form submit
Pros:
• Native
• Easy to implement
Cons:
• Multiple file selection: not supported
• Directory traversal: not supported
• Drag & Drop from FS: not supported
8. HTML5. JS (File API + AJAX)
Implementation:
• <input type="file" multiple=""/>
• File API
Pros:
• Multiple file selection
• One input field for all files
• Pre-processing files on client side
Cons:
• Firefox 3.6.*: several implementation issues
• IE: not supported
• Directory traversal: not supported
24. Multi threaded applet VS single threaded JS
JS JVM
queue
Thread #3
Thread #3
Thread #1
Thread #1 Thread #2
Thread #3
Thread #2
JS Thread #1
Thread #1
25. Upload applet
Implementation:
• Java-applet
Pros:
• Multiple file and directories selection
• Directory traversal
• Drag & drop directly from File System
Cons:
• Java & Java plugin required
• Mac OS X: works only in Safari
гугл добавил загрузку фолдеров -- узнать как они грузят фолдеры (если можно). во всяком случае, для других клиентов они добавили загрузку фолдеров через апплет http://googledocs.blogspot.com/2011/04/simpler-file-upload-in-google-docs.html
не все браузеры хорошо поддерживают (например, 3.6.*) http://stackoverflow.com/questions/4263118/html5-drag-drop-uploads