Loading ...
Sorry, an error occurred while loading the content.
 

Re: Misc Uploader HowTos

Expand Messages
  • Allen Rabinovich
    Reposting, because I used a wrong screenname -- this way the message will be archived on the groups site for posterity: No, unfortunately the only way to get
    Message 1 of 4 , Dec 8, 2008
      Reposting, because I used a wrong screenname -- this way the message will be
      archived on the groups site for posterity:

      No, unfortunately the only way to get files into Flash is through its
      built-in Open File dialog. This is a security issue, and so chances
      are, no new features will be added to allow for other methods of
      bringing files in.

      - Allen

      --- In ydn-javascript@yahoogroups.com, "Lee.M" <jupiter@...> wrote:
      >
      > thank you Allen :)
      >
      > Can you pragmatically add file to flash's list? I could conceivably
      > have an input with an on change that gets the files dragged into it
      > into an array.
      >
      > That'd be uber cool!
      >
      > On Nov 13, 2008, at 6:49 PM, Allen Rabinovich wrote:
      >
      > > Most of these are quite possible. Here are some notes:
      > >
      > > > - add a 'remove this file from the list' button
      > >
      > > Yes. Look at how rows are generated when files are added to the table;
      > > add another column containing a button that, when called, calls a
      > > "removeFile" method on the uploader with the particular fileId. You
      > > should make sure to keep track of that id, so that when you queue
      > > files for upload, you don't use it.
      > >
      > > > - change that button to a 'stop uploading this file' button
      > >
      > > Yes. You would use the "cancel()" method of the uploader with a
      > > specific fileID to cancel a particular file's upload.
      > >
      > > > - drag files into the 'Select Files' (IE with a regular <input
      > > > typ="file" I can drag a file to it to populate its value) to
      > > populate the queue
      > >
      > > No, unfortunately drag-and-drop behavior is not supported. This is a
      > > function of the Flash player, so we can't do much.
      > >
      > > > - show the size in human bytes 1.4kb, 2.3 MB, etc
      > >
      > > That's up to you: the sizes are passed to JS as bytes; you can render
      > > them as you see fit.
      > >
      > > > - not do duplicates (select file.jpg) then select it again - it
      > > gets added and hence uploaded twice
      > >
      > > This is trickier: you can compare individual files' names/creation
      > > dates/modification dates and use that to find duplicates.
      > >
      > > > - once an upload is complete remove it from the queue (upload
      > > > file, add one more, and both are now ready to upload again)
      > >
      > > Again, you can use removeFile() to accomplish that.
      > >
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.