timraay/Barricade

Uploading images through the submission form

Opened this issue · 0 comments

Google Forms allows you to submit files, including images. These can then be downloaded and stored in the database.

The URL you get when collecting the form's response is https://drive.google.com/u/1/open?usp=forms_web&id=XXXXX. The image can be downloaded using https://drive.usercontent.google.com/download?id=XXXXX&export=download&authuser=1.

There's a number of caveats however.

  • You need to be authenticated to download the image. Can these permissions be changed? Do we need to use the Google Drive API (yuck)? Or maybe we can download them using the submission handler script attached to the Form and include the images as base64 encoded strings? This might be problematic if Google imposes bandwidth usage limits.
  • You can't really edit the images. Maybe we can add an extra control that says "remove all images", but that's not perfect ofc.

Uploading the same images tens of times to various discord channels might also be a little too intensive?