Sounds like the second option is probably easier for you. I have to admit, it's the file sharing library is not the easiest code to follow with all the callbacks flying around.
Take a look at the files in the following gist. It's a hack of the data channel file sharing demo.
In the applications .js file, I've added a magicDataOut parameter to the sendfile method.
In the applications .js file, I've added a magicDataIn parameter to the function that determines whether you accept or a reject a file.
And of course, the library has been extended to support these two parameters.
Note: I did not do anything with the file dropping code. That's just garden variety browser stuff so it shouldn't pose any problem to you.
Eric.