MCPcopy Create free account
hub / github.com/error311/FileRise / triggerFilePickerOnce

Function triggerFilePickerOnce

public/js/upload.js:169–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167let _lastFilePickerOpen = 0;
168
169function triggerFilePickerOnce() {
170 const now = Date.now();
171 // ignore any extra calls within 400ms of the last open
172 if (now - _lastFilePickerOpen < 400) return;
173 _lastFilePickerOpen = now;
174
175 const fi = document.getElementById('file');
176 if (fi) {
177 fi.click();
178 }
179}
180
181// Wire the "Choose files" button so it always uses the guarded trigger
182function wireChooseButton() {

Callers 2

wireChooseButtonFunction · 0.85
initUploadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected