Update JS to allow Gallery field to select a file

Signed-off-by: Elliot Condon <e@elliotcondon.com>