Core Changelog.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. * SWFUpload Core, January 2009, www.swfupload.org, swfupload.googlecode.com
  2. * --------- Version 2.2.0.1-----------
  3. * - Removed requeueUpload due to bugs/poor testing
  4. * = Fixed namespace conflict that broke stopUpload
  5. * --------- Version 2.2.0-----------
  6. * + Added button_placeholder setting that accepts a DOM element.
  7. * + Added ability to requeue any file (including some improvement to internal queue state tracking)
  8. * + UploadErrors caused by a missing upload_url now causes the file to be requeued automatically
  9. * + Added preserve_relative_urls setting
  10. * + SWFUpload now converts relative URLs to absolute URLs to avoid issues with Flash Player interpreting it differently on some clients
  11. * + Added assume_success_timeout setting which allows uploadSuccess to be called after a timeout if, for some reason Flash ignores the server's response
  12. * An additional parameter has been added to the uploadSuccess event to indicate whether a response was received or success was assumed.
  13. * --------- Version 2.2.0 Beta 2 ~ 5-----------
  14. * = Fixed a Queue Limit bug
  15. * + Improved internal event handling code so uploadSuccess fires even when not content is returned from the server (*woot*, except for Macs)
  16. * = Fixed issues in Destroy
  17. * = Fixed issues with Queue Plugin
  18. * + Added periodic checks of the ExternalInterface
  19. * + Improved IE memory leak prevention code
  20. * + Added Speed Plugin
  21. * = Updated Queue Plugin for better multi-plugin compatibility
  22. * --------- Version 2.2.0 Beta 1-----------
  23. * + Added Flash Player 10 Support
  24. * = Added setting for defining a button image
  25. * = Added setting for defining button text
  26. * = Added setting for defining button width, height and padding
  27. * = Added setting for defining what element the Flash Movie should replace
  28. * = Added setting for defining flash wmode
  29. * = Added setting for defining the mouse cursor
  30. * + Added prevent_swf_caching setting as a work-around for issues in Avant Browser (and other IE based browser)
  31. * + Added setting for accepting HTTP Status codes other than 200 as successful
  32. * + Added parameter to cancelUpload that allows the uploadError event for cancelled uploads to be supressed
  33. * + Added pro-active memory leak fix for IE and fixed problems with the destroy function (credits to steffen for patches and testing)
  34. * + Replaced callFlash with CallFunction (using the internal function that Flash uses). Based on code from MooTools.
  35. * = Fixed bug in the Queue plugin that breaks startUpload when passing a file id.
  36. * + Updated Queue plugin to stop the queue if false is returned from the uploadStart handler.
  37. * = Fixed small issues in SWFObject plugin
  38. * = Fixed issue with ExternalInterface string escaping
  39. * - Dropped Graceful Degradation Plugin
  40. * - Dropped v1.0.2 Plugin
  41. * - Dropped Flash Player 8 support
  42. * --------- Version 2.1.0 -----------
  43. * = Fixed GET values so they are escaped properly
  44. * + Added destroy function
  45. * = Added exception handling around browse() calls
  46. * = Minor code cleanup
  47. * + Split Core and Demos
  48. * --------- Version 2.1.0 Beta 2-----------
  49. * = Fixed bug in XHTML fix where it wasn't split correctly by Flash
  50. * = Fixed file params "undefined" in debug output
  51. * + Added requeue_on_error settings so HTTP/IO/Security errors requeue the file instead of discarding it.
  52. This will affect the queue plugin (if an error is occurring the file will be reuploaded and reuploaded).
  53. * = Fixed HTTP/IO error behavior. We'll see how this goes Flash 9 is supposed to call HTTPError followed by an IO error but I suspect they come out of orde sometimes.
  54. * = Fixed invalid characters in file param names. Worked around flash bug by escaping the names. Should be transparent to devs.
  55. * = Fixed missing upload URL logic so it fires consistently
  56. * = Fixed file params not being sent when useQueryString is true
  57. * + Added SWFObject plugin and demo.
  58. * + Added CookieBug demo to demonstrate what they bug really is all about.
  59. * + Added VB.Net version of the Application Demo
  60. * --------- Version 2.1.0 Beta 1-----------
  61. * + Added allowScriptAccess="always" to the embed/object elements so the SWF can be served from different domains.
  62. * = Fixed a type-o in the debug output that prevented the instance id (movieName) from displaying. - Thx Joel
  63. * + Rewrote SWFUpload.js for better code reuse based on sample code from batiste.bieler (thanks!!!)
  64. * + Added queueComplete event to the Queue Plugin
  65. * + Added Simple Upload demo
  66. * = JSLinted all the JavaScript code
  67. * + Added use_query_string setting (and setUseQueryString function) that forces post_param and file_param values to be sent on the query_string instead of the post (for Flash 9 version)
  68. * = Fixed file.type and date properties so a default value is provided (rather than null) when no value is provided by flash.
  69. * = Fixed misc bugs in the demos
  70. * = Fixed ExternalInterface calls being made available for Flash 9 versions <9.0.28 which aren't supported
  71. * + Fixed use of & producing invalid XHTML in the <object> and <embed> tags.
  72. * - Removed the use of the embed tag (using the <object> sample from the Flash Satay method)
  73. * = Updated plugins to work with code rewrite changes.
  74. * = Extracted FileProgress object in to its own file.
  75. * + Added addPostParam and removePostParam functions
  76. * --------- Version 2.0.2 -----------
  77. * = Fixed a bug where post params could not be added to the current file (because it is removed from the queue when it becomes current)
  78. * = Fixed a conversion error when converting kilobytes to bytes in the file size check
  79. * = Fixed a problem in the documentation that said the file_size_limit was bytes when it is actually kilobytes
  80. * + Added formatting to the documentation, a table of contents, and details for each setting .
  81. * + Added units for file_size_limit setting. The setting understands B, KB, MB, GB. Default is KB.
  82. * + Added a check for the ExternalInterface functions in flashReady so SWFUpload will not fire the loaded event if those are not available.
  83. * --------- Version 2.0.1 -----------
  84. * = Fixed a bug where zero-byte files would stop file the queuing process.
  85. * = Finished updating Features Demo
  86. * + Added GetFileByIndex(i) that gets a JavaScript File Object. The index never changes. Finished files continue to be available.
  87. * The JavaScript GetFile function will accept a file_id or an index.
  88. * + Added CheckFileSize constants to replace the magic numbers
  89. * + Added some code in an attempt to fix "Script is running slowly" error messages
  90. * = Better cleanup of FileReference objects
  91. * --------- Version 2.0 -----------
  92. * + Re-created SWFUpload in Actionscript v2 for Flash 8 compatibility. Flash 8 loses POST and Server Data features. The two versions are otherwise fully compatible.
  93. * Flash 8 uses URL to pass post_params/file_params.
  94. * = Changed uploadStart event so it's part of the setTimeout/eventQueue workaround. This allows Flash functions to be called from uploadStart.
  95. * = Renamed uploadComplete to uploadSuccess and fileComplete to uploadComplete. All started uploads call uploadComplete (even if cancelled or stopped).
  96. * = Changed startUpload validation failure behavior. Rather than cancelling the upload the file is now requeued. Devs can cancel
  97. * or do whatever the need to in uploadError to handle the problem.
  98. * = Fixed fileQueueLimit/fileUploadLimit logic so it works correctly.
  99. * = Moved the upload request building to a later point so that the post params and file params can be updated in uploadStart.
  100. * - Removed the last of the UI stuff (ui_container, degraded_container).
  101. * + Started development on Plug-ins. Graceful Degradation, v1.0.2, Cookies, Queue Handling
  102. * = Fixed missing file_status field in FileItem.
  103. * + Added modificationDate to FileItem (file object)
  104. * + Added setStats function that lets you change the file upload count, etc. This will give more power over the queue limits. Not well tested.
  105. * = Renamed compeleted_uploads to successful_uploads in getStats object
  106. * + Added in_progress to getStats object
  107. * --------- Revision 7.0 beta 3 -----------
  108. * + Added an "event queue". Events are added to an array and executeEvent is called on a setTimeout. This prevents out of order issues that occur
  109. * in the Safari browser.
  110. * + Added a check for the UPLOAD_COMPLETE_DATA event constant which only became available in Flash Player 9.0.28. This
  111. * fixes the Flash Version detection (Flash Object Detection) which was accepting Flash Player 9 versions before 9.0.28.
  112. * - Removed old code block that was missed when moving from a Flash Timer to the JavaScript timeout (caused certain cancel events to be called twice)
  113. * = Change ShowUI to the swfUploadLoaded event which will hopefully make it more clear that this is an overrideable event
  114. * = Changed flashReady to behave like the other events (uses setTimeout and the Event Queue).
  115. * --------- Revision 7.0 beta 2 -----------
  116. * = Changed ERROR_CODE_FILE_NOT_FOUND to ERROR_CODE_FILE_ID_NOT_FOUND
  117. * + Grouped the error code constants in objects for queue errors and upload errors.
  118. * + Added an UPLOAD_STOPPED error code.
  119. * = Changed Event calling method (using Timer) in Flash. Timer is no longer called
  120. * instead setTimeout is called in JavaScript. This includes a change to the
  121. * JavaSCript design so the Event methods are not directly overridden but stored
  122. * internally and called if defined (with a setTimeout). This is an effort
  123. * be more compatible with the current Flash Player on Linux
  124. * = Changed the parameter order for the fileQueueError and uploadError events so the fileObj is first, like other events.
  125. * + Added an empty JavaScript object (customSettings) where users can store settings associated with the instance.
  126. * + Worked around an escaping bug in the ExternalInterface library by escaping all backslashes in out-going strings.
  127. * = Updated all the demos.
  128. * --------- Revision 7.0 beta 1 -----------
  129. * = Redesigned the Event Chain
  130. * - Removed much of the queue concepts
  131. * - Removed the fileValidation events. This can be done in the new uploadStart event
  132. * - Removed beginUploadOnQueue feature. This can be done in the new dialogComplete event.
  133. * - Removed use_server_data. This is now always on.
  134. * + Added functions for retrieving queue stats (number of files uploaded, queued, errors, etc)
  135. * + Added a file status property to the FileObject. This indicates, uploaded, error, waiting.
  136. * + Added a single file browser (user cannot select multiple files)
  137. * + Fixed bug (hopefully) caused if Flash call to JavaScript and in the callback JavaSCript calls to Flash
  138. * This only place this does not apply is to uploadStart. If you call in to Flash from uploadStart use a setTimeout to do it.
  139. * --------- Revision 6.2 -----------
  140. * + Added API calls for changing all the changeable settings dynamically
  141. * = Fixed a bug in FileComplete event handler (in the SWF) that caused an error in Debug Players
  142. * and prevent the event from being called
  143. * + Added a setting (use_server_data_event) to indicate whether FileComplete or ServerData should be called.
  144. * The SWFUpload architecture requires that only one file upload success event can be called.
  145. * = Updated all the Demos, especially the Features Demo and the Forms Demo
  146. * --------- Revision 6 -----------
  147. * - Removed the call to setUploadSettings in flashReady. This was a left over call that is unnecessary.
  148. * + Finished the parsing of post params during the init stage. This ommision was hidden by the call to setUploadSettings.
  149. * - Removed the flash_target_id setting. The Flash file should only ever be added to the body tag.
  150. * + Fixed (hopefully for good) another SWF race condition. IE executes the SWF very very early. The this.movieElement value should never be referenced.
  151. * The movie Element should always be retrieved using this.getMovieElement().
  152. * --------- Revision 6 -----------
  153. * + Ported to ActionScript 3. Revision 6 requires Flash Player 9.
  154. * = Fixed bug caused when cancelling single files. Would break any function that searched for a file_id.
  155. * - Removed the automatic cookie sending setting. Devs should just pass the value they want to send in the post_params
  156. * - Removed the query params settings (global and file specific). All params should be sent in the post_params
  157. * + Added post_params which adds post values to the file upload post.
  158. * + Added validate_files setting flag which causes the fileValidation event to be called before each file is uploaded.
  159. * + Added fileValidation event. Return false if validation fails and true if validation is successful.
  160. * + Added server_data parameter to the fileComplete event which returns any text that the upload script returns.
  161. * = Updated all demos to work with Revision 6
  162. * + Added in-code file extension validation. Before a file is queued the extension is checked against the valid extensions.
  163. * Files the have invalid extensions cause the error event to be raised.
  164. * + Added 'file_post_name' setting that allows the post variable name containing the file data to be named something other than 'Filedata'
  165. * = Fixed a race condition in loadFlash where a cached flash movie would execute before this.movieElement could be assigned and loading would fail.
  166. * --------- Revision 5.2 -----------
  167. * = A little more code cleaning and variable renaming
  168. * + Changed from an array queue to a FIFO queue. This eliminates the "current_index" and
  169. * should reduce some memory usage.
  170. * + Added out of order file uploading. Call StartUpload(/file_id/).
  171. * + Added custom query_string parameters in addition to the cookies
  172. * + Added the ability to modify the URL, cookies, params and send to flash
  173. * + Added per file query_string params
  174. * + Added files queued limit. Sometimes you may want the user to only queue one file at a time (or something)
  175. * + Fixed limits so a zero(0) value means unlimited.
  176. * --------- Revision 5 -------------
  177. * = More code cleaning. Ported SWF to FlashDevelop. (Since my Flash Studio trial expired)
  178. * The port to FlashDevelop is a big deal. It significantly changes the code structure
  179. * and could introduce bugs. Also there have been reported issues with the FlashDevelop
  180. * version from swfupload.mammon.se: Doesn't start when reloading in IE. Doesn't start
  181. * in Firefox if the SWF file is visible because of a page scroll.
  182. * + I fixed the Firefox issue by removing the wmode attribute from the embed object.
  183. * + I cannot reproduce the IE issue on my local machine (although I can reproduce it at swfupload.mammon.se)
  184. * + Event Handlers are now attached to the SWFUpload javascript object. The SWF file
  185. * now calls the handlers in the context of the SWFUpload object which means the "this"
  186. * object inside the handler refers to the proper SWFUpload instance.
  187. * + Tested and Fixed upload target cookie attachment
  188. * = Cleaned up / renamed everything for clarity and consistancy
  189. * + File queuing is now subject to the upload limit. If the user attempts to queue more files
  190. * than allowed an error is returned and the files are not queued.
  191. * + Fixed misc bugs and text encodings.
  192. * + Added more debug info for the SWF file.
  193. * + SWF file now obeys the debug setting.
  194. * + Added SetUploadTargetURL function that allows you to "dynamically" change the upload target
  195. * + Added error code for zero byte file uploads which always return an IO error. The files are now rejected
  196. * instead of being uploaded.
  197. * --------- Revision 4 -------------
  198. * = Cleaned up code. Added comments. Reorganized. Added more try..catches. Removed old unused methods.
  199. * - Removed the 'create_ui' setting. The UI is now completely up to the developer.
  200. * + Added upload_backend_cookies setting. Can set a string, or array of cookie names. These values will be
  201. * passed as part of the upload_backend url
  202. *
  203. * = Changed QueueComplete event to only fire if at least one file has been successfully uploaded.
  204. * + Added "Stop Upload" feature.
  205. * = Revised the FLA file to clean things up, better handle errors, etc.
  206. * = Fixed a bug where cancelling the first upload would cause the remaining uploads to fire before calling
  207. * "startUpload". This change is in the FLA.
  208. *
  209. * + Fixed a bug in the upload.swf that prevented further file processing after an error is returned.
  210. * + Added uploadLimit variable. Only complete uploads are counted. Once the limit is reached the flash
  211. * movie will not upload any more files. (The ability to select or queue many files is not affected
  212. * by the upload limit)
  213. * + Added cancelQueue and cancelUpload methods.
  214. * + Added ID property to the FileObj in the upload.swf
  215. * + Added Upload and Queue settings
  216. * + Added methods for generating the flash HTML and inserting it into the DOM.
  217. * - Removed SWFObject
  218. * + Updated the upload.swf and added the "flashReady" event. This will only call back
  219. * for Flash 8 and above. With this we don't need a flash version detect script.
  220. * The script initializes the Flash then waits for the Callback to init the UI.
  221. * + Added seperate ui_target, degraded_target, create_ui settings. This allows fine control
  222. * over what parts of the GUI the script displays and hides
  223. *
  224. * + Changed from a Static Class to an Instance (changed code/class structure)
  225. * + Added "flash_version" setting. When set to zero the version check is skipped
  226. * + Added Debug Console. The Instance class can't do document.write.
  227. * = De-obfuscated SWFObject a bit
  228. * - Removed standalone mode.
  229. * + Added "ui_target" setting. When non-blank the link is added.
  230. * + Added "flash_target" setting. When blank the flash is appended to the <body> tag
  231. * = This fixes ASP.Net not allowing the flash to be added to the Form
  232. * + Added error checking to the callSWF method
  233. *
  234. * -------- -------- -------- -------- -------- -------- -------- --------
  235. * SWFUpload 0.7: Flash upload dialog - http://profandesign.se/swfupload/
  236. * SWFUpload is (c) 2006 Lars Huring, Olov Nilzén and Mammon Media and is released under the MIT License:
  237. * http://www.opensource.org/licenses/mit-license.php
  238. * -------- -------- -------- -------- -------- -------- -------- --------
  239. * SWFUpload 0.7: Flash upload dialog - http://profandesign.se/swfupload/
  240. *
  241. * VERSION HISTORY
  242. * 0.5 - First release
  243. *
  244. * 0.6 - 2006-11-24
  245. * - Got rid of flash overlay
  246. * - SWF size reduced to 840b
  247. * - CSS-only styling of button
  248. * - Add upload to links etc.
  249. *
  250. * 0.7 - 2006-11-27
  251. * - Added filesize param and check in SWF
  252. *
  253. * 0.7.1 - 2006-12-01
  254. * - Added link_mode param for standalone links
  255. * if set to "standalone", createElement("a") won't run.
  256. * - Added link_text param if css isn't needed.
  257. * - Renamed cssClass to css_class for consistency
  258. *
  259. */