set cookie when selected file