Skip to content
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

Question: How to link files to the database? #13

Open
chmac opened this issue Jan 23, 2020 · 0 comments
Open

Question: How to link files to the database? #13

chmac opened this issue Jan 23, 2020 · 0 comments
Labels
question Further information is requested

Comments

@chmac
Copy link
Collaborator

chmac commented Jan 23, 2020

There are various approaches. Right now we do the following:

  • Upload a file, get back its "ID"
  • Save that ID into client state
  • Move to the data entry form
  • Pass the ID to the database on form submission

This means you can upload files, abandon the process, and the files are left forever. We would have a hard time matching them to ensure which files we can delete. Not impossible, but a pain.

We could instead go to the database first, but that's also a bit of a pain.

  • Go to the database and get an ID
  • Upload the file with the ID
  • Submit the ID along with the form data

In this scenario, how do we trigger an event to delete the file? It'd need to have some kind of timeout or whatever. That's not really clear. There's also no database event that we could rely on...

@chmac chmac added the question Further information is requested label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant