configure tmp upload dir from javascript