Storing media in data tables (was Unexpected: Server code took too long)

Hi there,

Is this part of your app’s normal day-to-day operation, or is this a one-time import of data? If it’s a one-time import, I would suggest running the import job on an Uplink, which isn’t time-restricted because it runs on your hardware. (See here for a code example: Importing existing data into Data Table)

If it’s part of your day-to-day operation, you have two options. As a business customer we can raise the timeout on your code (so it can complete all at once) - this makes sense if it you only need a little extra time (eg the import will only take a minute or two). Otherwise, we’d recommend doing it in chunks - eg store the file itself in a Data Table row, and make one server call that only imports lines 0-99, one server call that imports lines 100-199, and so on. (The advantage here is that you can give your client a progress indication too.)

Does that make sense to you?