Home
Support Forums

Upload and parse a csv-file

Hi,

I want to build an app where I will restructure data from file to match a certain format. So my idea is:

  1. upload a csv-file via form
  2. parse it
  3. extract some data and build a new file and return it as csv
    I don’t have to store any data, just return a restructured file.

Basically my question is: Can this be done with netlify and functions?
I found https://www.papaparse.com/ that I’d like to use for working with the data. Can this be used in a function?

I am completely new with serverless functions, so forgive me if I am asking weird questions…

Thanks for for your thoughts and comments!

Hi @PeMan68,

Yes, it’s possible, but the question that’s more important is, is this possible within Functions’ file size limit of 6 MB and time limit of 10s?

Also, do you really want to return the new CSV file back to the client browser?

Thanks for answer,

The file-size is ok for the files I will handle.

For what reasons shouldn’t I return the csv file to the browser?

No reasons, just was curios why you’d need to build a serverless function to do this, because if you need to return the file, it looks like something possible within the client-side itself.