HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

DropBox js

Hi , I have been looking for ways to improve my upload form for the Galleries plugin . Mostly for a way to easily upload more files at once or to improve the upload experience by adding a drop box instead of the default way.

I have been doing some research and found this bit of js that can be incorporated to any form or any component or object . And it does not rely on jquery from what I could understand in their info.At least the latest version of this code..

I would like to know of the best way to aproach this . According to the info for this js all one needs to do is add the class dropbox to the form and add the script to head and that's it.

Seems easy enough right? 10 minutes tops ... no, I am going to do this myself but just was wondering if anyone has done it before. Or if they think it may serve as a good plugin to maybe enhance all the uploads.



  • Options
    aeryaery Gtricks Forum in 2.2 :) ✭✭✭

    Aigaaaa... I thought it as dropbox file sharing.

    Its actually dropzone, dragging files instead of selecting them.

    I guess this functionality should be included by default to all the uploading plugins. I am looking at you file upload plugin.

    There was an error rendering this rich post.

  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    via Email
    This is actually a more involved solution than you may think because
    you need a server-side implementation for it too. At any rate, read
    their entire webpage because it tells you how to instantiate stuff
    with jquery manually.

    $("div#myId").dropzone({ url: "/file/post" });

    You can see that you need to provide a server-side location to handle the files.
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes I read it and it seems there are several ways to use this. Was joking about the simplicity . I am sure it is not a 10 minute job.

    since my Galleries upload forms uses this system to upload

    < form action="" method="post" enctype="multipart/form-data">
    < input type="file" name="file" />
    < /form >

    and I could possibly tie into the already existing server handling parts in the Galleries Plugin upload parts.

    $uploaddir = '/forum/uploads/picgal';

    the server side location is uploads/picgal

    this helped figure out the Galleries plugin upload ways


    but there is still more to read. I guess by the answers no one has attempted this before ?

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Ok , reporting on the experiment, I able to get the drop zone to be crated and you can indeed drag an image and it shows up as suggested by the info.

    Now all I need is for my images to be registered I am getting the invalid image format message ....

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited June 2013

    Ok I have been able to add the dropzone to the uploads form for the comments .

    I used the jquery method to attach it to the form as per @Todd suggestion and it works , however it seems to convert the image into base64 and adds a

    denied:data:image/png;base64, and a very long hash

    when I removed the denied part the image showed and was uploaded too.

    How can I allow or have it allow instead of deny ? I added the mime type to the config but not sure if I did that correctly or if it has no effect ?

    I think I need to add the decode base64 somewhere ?

Sign In or Register to comment.