diff --git a/packages/import-handler/src/index.ts b/packages/import-handler/src/index.ts index ddd8a7beb..d1acf0a9e 100644 --- a/packages/import-handler/src/index.ts +++ b/packages/import-handler/src/index.ts @@ -195,13 +195,6 @@ const contentHandler = async ( const handleEvent = async (data: StorageEvent) => { if (shouldHandle(data)) { - console.log('handling csv data', data) - - const stream = storage - .bucket(data.bucket) - .file(data.name) - .createReadStream() - const handler = handlerForFile(data.name) if (!handler) { console.log('no handler for file:', data.name) @@ -220,6 +213,11 @@ const handleEvent = async (data: StorageEvent) => { return } + const stream = storage + .bucket(data.bucket) + .file(data.name) + .createReadStream() + const ctx = { userId, countImported: 0,