importing folders via drag and drop hangs

Using Firefox 9.01 on Windows 7 64 bit I tried dragging and dropping a folder into my documents. The progress dialog pops up, but never shows progress.
2 people have
this problem
+1
Reply
  • When the drag-and-drop upload feature was originally written for Alfresco there was no support for folder upload across the various browsers. It looks like both FireFox and Chrome have added some level of proprietary support now though which is outside of the HTML5 specification. Technically a folder is a file - so uploading in Chrome will result in the upload of a 0kb file (the folder contents will NOT be uploaded) but FireFox does not support 0kb uploads which is why you get no upload dialog but in fact get an upload error indicated.

    Technically the upload has not hung - it is displaying the error icon to indicate that the upload has failed.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • I’m sad
    That's fine, but the upload does hand sometimes without an error icon. I selected a number of files (with a folder) and then did an upload. It looks like it thinks the folder is 4k in size and just hangs when it gets to it with no message or anything. The folder has 4 jpg files in it.

    See the attached image. It just hangs like that. That's what I consider the bug. Not the case when it gives an error.

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • My apologies... you're correct. When I tested I only dropped a folder (rather than a combination of files and folders). This does indeed look like a bug. The size value is displayed is purely the browsers interpretation of the "file" size - effectively we're only displaying the information provided to us by the browser. However, it does seem that we need to update our code to handle this scenario - this would be one of the main problems with developing against Mozilla's frenzied release cycle! ;-)

    I can't say whether or not we will fix this issue to support folder upload or whether or not this will be fixed to simply not block on folders being dropped - but we will certainly resolve what you've rightly pointed out as an undesirable user experience.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • I’m happy
    Thanks. As you say, there are two seperate things here.

    1. A feature request for supporting uploading of folders (and hierarchies of folders) - please, please add this.
    2. A bug in the way that folders are handled with at least this release of firefox if they are mixed in with other files.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • I’m confident
    Updating this issue to In Progress as David has raised a bug for this.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited

  • The hanging has now been fixed internally (but at the time of writing is NOT yet on the live site).

    Regarding the folder drag and drop support (although this is not an official answer regarding your feature request) after doing some further investigation it seems that there is support for uploading folders in Webkit and Firefox but only via the file type input element.

    This is achieved by adding the attributes "webkitdirectory" (for Webkit browsers) and "mozdirectory" (for Firefox) along with "directory" (which may or may not become a standard) to the file input element. These attribute allows the user to select a folder from the browse dialog and all the files in that folder are then selected for upload (note the folder itself is not uploaded). Drag and drop is *currently* supported only for this one element i.e. it cannot be applied to general HTML elements with the "droppable" attribute added as we have used to implement drag-and-drop upload support.

    The only way in which we could achieve dragging and dropping folders at the present time is if we used a transparent (not hidden) file input element behind each drop target. However, since it is not possible to style file input elements to control size it means that the drop target (e.g. the folder) would have to be the same size as the input element - this is made even more complicated due to the fact that the file input element is rendered a different size in each browser.

    In summary, I don't believe that it is a viable option that can currently be implemented at the moment.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited