fix upload called on directories in LFM