1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Lack of Interest Ability to upload files on AutoValidator forms

Discussion in 'Closed Suggestions' started by Jake B., Jan 10, 2015.

  1. Jake B.

    Jake B. Well-Known Member

    Title says all, not sure if something like this is already planned for 2.0, but if not it should be done; would make things much easier.
  2. Mike

    Mike XenForo Developer Staff Member

    FWIW, the reason we don't do it -- aside from the annoyance of potentially uploading a file multiple times if errors occur -- is that it requires browser support to be done; specifically, < IE 10 doesn't support it. (That said, as I'm writing this, there may be a possible workaround with a hidden iframe but I'd have to look into it further.)
  3. Jake B.

    Jake B. Well-Known Member

    Potential workaround for that is to not move the file from the OS temporary directory until after all data checking takes place (including checking that the uploaded file is of a allowed type - zip, png, etc) then moving it to it's "final" location after everything is known to be good. Then if there are errors, they will be displayed and that directory should already automatically cleans itself already iirc

    That is a bit of a bigger issue though, since it seems that IE 8 and IE 9 still have almost 30% market share on desktop browsers. Sad really.
  4. Chris D

    Chris D XenForo Developer Staff Member

    As I said to @Mike Creuzer there should be some ability to re-use/copy and amend parts of the AutoInlineUploader code used for the avatar uploading.

    The default code auto submits when the file input changes, though, so that may not be totally desirable but certainly that code is a step in the right direction.
  5. Jake B.

    Jake B. Well-Known Member

    We actually were going to use that in a modal on the page, however we couldn't get it to close the modal after the upload takes place. Any idea on how to get that functionality working?
  6. Chris D

    Chris D XenForo Developer Staff Member

    Probably one to continue at the Development Discussions forum.

    It should probably just be a case of simulating a click on the overlay closer when you know the upload has finished, e.g.


Share This Page