c79deb301511fcf0de0ed376c7746e4902804472 chmalee Fri May 5 16:59:33 2023 -0700 Experiment number one, can succesfully upload a file and store it via hgCustom. New userdata library for managing where to store the files Get skeleton structure of new cgi together More work in progress, mostly stubbing out the CGI More work in progress, mostly stubbing out the html page diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c index 2616c8a..a427a2e 100644 --- src/hg/hgCustom/hgCustom.c +++ src/hg/hgCustom/hgCustom.c @@ -314,33 +314,33 @@ else cgiTableField("Paste URLs or data:"); if (isUpdateForm && dataUrl) cgiTableField(" "); else { puts("<TD ALIGN='RIGHT'>"); puts("Or upload: "); cgiMakeFileEntry(hgCtDataFile); cgiTableFieldEnd(); jsInline( "$(\"[name='hgt.customFile']\").change(function(ev) { \n" " var fname = ev.target.files[0].name; \n" " var ext = fname.split('.').pop().toLowerCase(); \n" - " var warnExts = ['bigbed', 'bb', 'bam', 'bigwig', 'bw', 'jpeg', 'pdf', 'jpg', 'png', 'hic', 'cram'];\n" + " var warnExts = ['jpeg', 'pdf', 'jpg', 'png', 'mov', 'webm', 'gif', 'webp', 'img', 'jar', 'rar', 'tar', 'html', 'md', 'doc', 'docx', 'xlsx', 'xls', 'rtf', 'xml', 'svg'];\n" " if (warnExts.indexOf(ext) >= 0) {\n" - " alert('You are trying to upload a binary file on this page, but the Genome Browser server needs access to binary files via the internet.'+" + " alert('You are trying to upload an unsupported file on this page, but the Genome Browser server needs access to binary files via the internet.'+" " ' Therefore, you will need to store the files on a web server, then paste the URLs to them on this page, or upload a text file with \"track\" lines '+" " ' and configuration settings that point to the file URLs. Please read the documentation'+" " ' referenced at the top of this page or contact us for more information.');\n" " $(\"[name='hgt.customFile']\")[0].value = '';" " }\n" "});\n" ); } if (!isUpdateForm) { cgiSimpleTableFieldStart(); if (warnOnly) { cgiMakeButtonWithOnClick("ContinueWithWarn", "Continue with Warning", NULL, "return submitClick(this);");