Store CSV filename in each row on import

Hi - I’ve got the standard ‘upload data as CSV’ working - but I’d like to add a column on import that stores the name of the file being imported - this allows me to check for the file’s existence in advance. Alternatively, I’d be fine storing this in another table, and then having a primary key to link the two - but looking for some examples of either approach. Thanks!