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

Function wireChooseButton

public/js/upload.js:182–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181// Wire the "Choose files" button so it always uses the guarded trigger
182function wireChooseButton() {
183 const btn = document.getElementById('customChooseBtn');
184 if (!btn || btn.__uploadBound) return;
185 btn.__uploadBound = true;
186
187 btn.addEventListener('click', (e) => {
188 e.preventDefault();
189 e.stopPropagation(); // don't let it bubble to the drop-area click handler
190 triggerFilePickerOnce();
191 });
192}
193
194function wireFileInputChange(fileInput) {
195 if (!fileInput || fileInput.__uploadChangeBound) return;

Callers 2

setDropAreaDefaultFunction · 0.85
initUploadFunction · 0.85

Calls 1

triggerFilePickerOnceFunction · 0.85

Tested by

no test coverage detected