Media field and the Web

I have a method that works great with the client, but not on the web.

var theFile = plugins.file.showFileOpenDialog();
var rawData = plugins.file.readFile(theFile);
var name = theFile.getName();
forms.action_list_comp.controller.newRecord()
forms.action_list_comp.act_type = '3'
forms.action_list_comp.act_document = rawData
forms.action_list_comp.act_name = name;

It makes a new record, loads a document an put the name of that document in a textfield.

Is there a way to do the same with a web browser?

The mediafield shows up- and download icons on the web, but there is no way to expand their script (at least I couldn’t find any).

for the web, use a editable media field for that!
in the web, an editable mediafield have a load & save button.

Hope this helps

Hello Harjo,

I have that, the question is how do I make a new record and get the name of the document in the name_field while I click on the load button.