aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app/javascript/activestorage/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'activestorage/app/javascript/activestorage/index.js')
-rw-r--r--activestorage/app/javascript/activestorage/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/activestorage/app/javascript/activestorage/index.js b/activestorage/app/javascript/activestorage/index.js
new file mode 100644
index 0000000000..a340008fb9
--- /dev/null
+++ b/activestorage/app/javascript/activestorage/index.js
@@ -0,0 +1,11 @@
+import { start } from "./ujs"
+import { DirectUpload } from "./direct_upload"
+export { start, DirectUpload }
+
+function autostart() {
+ if (window.ActiveStorage) {
+ start()
+ }
+}
+
+setTimeout(autostart, 1)