-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataset preview data #143
Dataset preview data #143
Conversation
import { syncReadCsv } from '../../lib/readCsv' | ||
|
||
/** | ||
* This service pick the first N rows of a CSV file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
csv lib we use also has from
so we can implement some kind of pagination in the future
1aab329
to
9ffc6f6
Compare
ee4887c
to
c026196
Compare
9ffc6f6
to
084805a
Compare
e50fcc4
to
a462d73
Compare
a462d73
to
089b834
Compare
const MAX_SIZE = 3 | ||
const MAX_UPLOAD_SIZE_IN_MB = 3 * 1024 * 1024 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking but use MAX_SIZE
to calculate MAX_SIZE_IN_MB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No good catch 💯 . This needs to be changed to 15MB now. I forgot thanks
csvDelimiter: z.enum(DELIMITERS_KEYS, { | ||
message: 'Choose a valid delimiter option', | ||
}), | ||
csvCustomDelimiter: z.string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't csvCustomDelimiter
be optional
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok, we always send an empty string because the field is always sent. Is in the validation that we check user picked custom and this field has content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comments
What?
Preview dataset CSV data
TODO