cancel
Showing results for 
Search instead for 
Did you mean: 

Open custom dialog when a file is uploaded

vincent_roye
Champ in-the-making
Champ in-the-making
Hi,

I would like to know how to open a custom dialog when a file is dropped in a folder. Here is how it goes :
- The user drops a file
- A pop-up asks a due date (because it's an assignment)
- A Javascript runs and starts a workflow with this due date

I can do the last part but I'm stuck at the pop up thing, could anyone help me please ?

Best Regards,

Vincent
1 REPLY 1

tonyrivet
Champ in-the-making
Champ in-the-making
Hi,

When a file is uploaded via drag'n'drop, the onFileUploadComplete method (from actions.js) is called.
You will have to override this method and create your pop-up here.

To do this, I think you can register a new action called onFileUploadComplete, and it will automatically override the native one.
Here is an example :

YAHOO.Bubbling.fire("registerAction",
   {
      actionName: "onFileUploadComplete",
      fn: function onFileUploadComplete(complete) {
                // Create your popup here
                }
        }


The problem is that this method is also called when you upload documents by other ways than drag'n'drop, or when you upload a new version of a document.
I don't know if it is a problem is your case…