Stephane PAQUET PRO said 5 months ago on Direct Upload Instantly :
  I'm not sure the token is still required in Rails 7.0.2 I was building an app few days ago and found out that you can remove it...
Also, if planning to use it it seems that you can write const token = event.target.dataset.directUploadToken; inside the stimulus controller (Rails 7 required) and avoid writing an helper method to generate the token and declaring it in the form.