Adding item to filemanager

Hi,

I’m uploading a file using my own uploader but am having difficulty having that file show up in my filemanager.

Here is my code for how i’m trying to add the newly uploaded file:

onFileUpload:function(item){
var ret = $$(“fm”).add(item, 0);
$$(“fm”).refresh();
},

Any thoughts?

Hi,

You may try to pass the parent id as the 3rd parameter of add() method and call refreshCursor after adding an item.

$$(“fm”).add(…);
$$(“fm”).refreshCursor();

However, FileManager was not designed to used a custom uploader. We recommend to use built-in Uploader.