草庐IT

directory-upload

全部标签

javascript - jQuery/JS : Get current URL parent directory

来自:http://www.site.com/example/index.html我怎样才能得到:http://www.site.com/example/并使用Javascript以及如何使用jQuery将其存储到变量中。提前致谢。 最佳答案 varmyURL="http://www.site.com/example/index.html";varmyDir=myURL.substring(0,myURL.lastIndexOf("/")+1); 关于javascript-jQuery/

javascript - Valums 文件 uploader 在 Internet Explorer 9 下不工作

Valumsfile-uploader(现在称为FineUploader)在InternetExplorer9下不起作用,但在Chrome下运行良好。因此在IE下它显示文件名和按钮取消并且没有上传百分比。有什么线索吗?更新:解决方案也在这里MVCValumsAjaxUploader-IEdoesn'tsendthestreaminrequest.InputStream 最佳答案 我知道这个问题是专门在asp.net下提出的,但是当我搜索“valumsajaxuploadIE9”时出现了这个问题,所以我会在这里发布我的修复,以防它能帮

Javascript/网络包 : how to concatenate all json files in directory with a custom loop over files

我正在用webpack构建一个reactJs包。我目前正在尝试将json文件连接成一个对象以与i18next一起使用。我觉得它很简单,我不想使用过于复杂的解决方案。我的目录结构如下messages/locale_name/domain_name.json如何在我的代码中导入常规对象中的所有json文件?到目前为止,我在一开始就很挣扎,因为我发现需要require('fs")的建议,但是webpack告诉我它无法解析fs模块,我已经看到我无法安装它是默认Node配置的一部分。感谢一些帮助。谢谢! 最佳答案 经过很多的摸索,实际上很容易

javascript - Node/ express : Error: Failed to lookup view "error" in views directory

我将我的nodejs模板引擎切换到了ejs(来自jade)。当我使用我的ejs模板运行我的app.js时,我收到一系列“无法在View中查找View‘错误’”日志。其中一些包括:GET/css/bootstrap.min.css50012.588ms-1390Error:Failedtolookupview"error"inviewsdirectory...GET/css/clean-blog.min.cssError:Failedtolookupview"error"inviewsdirectory...GET/js/bootstrap.min.jsError:Failedtoloo

javascript - jquery.fileupload.js :87 Uncaught TypeError: $. 小部件不是 jQuery-file-upload 上的函数

我尝试使用basicsource的示例(jquery-file-upload),我包含在我的html中的文件是:jquery.jsbootstrap.cssbootstrap.jsjquery.fileupload.cssjquery.iframe-transport.jsjquery.fileupload.js为了正确使用jquery-file-upload,我还应该包括什么吗?我的应用不需要使用jquery-ui。如果jquery-ui确实依赖于jquery-file-upload,是否有任何解决方法可以在没有jquery-ui的情况下使用它? 最佳答案

javascript - jQuery 文件上传插件 : trigger an event when all files are uploaded

我使用jQuery文件上传插件(http://blueimp.github.io/jQuery-File-Upload/)来管理我的文件上传。它工作得很好。我可以检测到每个文件何时上传并(例如)显示一条消息。但我想检测每个文件何时上传以显示最终消息。如何做这样的事情?下面是我的实际实现:$('#fileupload').fileupload({url:"api/fileManager",dataType:'json',maxFileSize:100000000,//100MBfortesting!dropZone:$(document.body)}).on('fileuploadcha

javascript - 语义 ui 的 `gulp build` 给出错误 'ENOENT: no such file or directory'

版本:gulp@3.9.1我已经通过npminstall安装了semantic-ui并在交互式设置过程中给出了默认设置。但是当我从/semantic文件夹执行gulpbuild时,我收到以下错误:[20:52:27]Starting'build'...BuildingSemantic[20:52:27]Starting'build-javascript'...BuildingJavascript[20:52:27]Starting'build-css'...BuildingCSS[20:52:27]Starting'build-assets'...Buildingassets[20:5

javascript - 如何将 apollo-link-http 与 apollo-upload-client 一起使用?

我正在尝试弄清楚如何使用apollo-link-http与apollo-upload-client.两者都创建了一个终止链接,但我怎么能同时使用这两个链接呢?在我的index.js中我有这样的,但它不会工作,因为两个链接都终止=>constuploadLink=createUploadLink({uri:process.env.REACT_APP_GRAPHQL_URL});consthttpLink=newHttpLink({uri:process.env.REACT_APP_GRAPHQL_URL});constclient=newApolloClient({link:Apollo

javascript - xhr.upload.onprogress 不起作用

除了永远不会触发xhr.upload.onprogress事件之外,以下代码中的所有内容都可以正常工作。$(function(){varxhr;$("#submit").click(function(){varformData=newFormData();formData.append("myFile",document.getElementById("myFileField").files[0]);xhr=newXMLHttpRequest();xhr.open("POST","./test.php",true);xhr.send(formData);xhr.onreadystate

javascript - 错误 : Couldn't find preset "es2015" relative to directory

当我尝试使用babel时出现以下错误。Error:Couldn'tfindpreset"es2015"relativetodirectorywebpack.config.jsmodule.exports={entry:'./main.js',ourput:{path:'./',filename:'index.js'},devServer:{inline:true,port:3333},module:{loaders:[{test:/\.js$/,exclude:/node_modules/,loader:'babel',query:{presets:['es2015','react']