小编Ari*_*Gro的帖子

IE11 - 对象不支持属性或方法“包含”

使用Rappid我在 IE11 控制台中遇到错误:

Object doesn't support property or method 'contains'
Run Code Online (Sandbox Code Playgroud)

此错误来自没有该方法的 SVGElement。Chrome 中的相同代码有效。

好像我需要填充工具为这种缺少方法,但根据MDN文档上包含它是从IE9支持和起来,但不支持SVGElement

编辑:这是一个片段 - 尝试在 Chrome 和 IE11 中运行

Object doesn't support property or method 'contains'
Run Code Online (Sandbox Code Playgroud)
const joint = window.joint;

let graph = new joint.dia.Graph;

let paper = new joint.dia.Paper({
    width: 1500,   /*200,*/
    height: 1500,  /*200,*/
    el: $('.paper-container'),
    gridSize: 1,
    drawGrid: true,
    model: graph,
    //defaultLink: new joint.shapes.app.Link,
    //defaultConnectionPoint: joint.shapes.app.Link.connectionPoint,
    interactive: { linkMove: false }
});

$('.paper-container').append(paper.el);
paper.render();
    
var member = function(x, y, …
Run Code Online (Sandbox Code Playgroud)

javascript svg polyfills internet-explorer-11 rappid

5
推荐指数
1
解决办法
3421
查看次数

Postman - 不存在所需的MultipartFile参数 - Spring,Java

编辑

这个问题不同于:jQuery Ajax文件上传:必需的MultipartFile参数'file'不存在 不同之处在于他们使用jQuery和Ajax,而我使用REST客户端 - 'Postman'

因此,我不必将Content-Type设置为false,而是完全删除它.

此外,在搜索关于"邮递员"的答案时,我相信人们会跳过其中包含jQuery和Ajax字样的问题,这就是我发生的事情

结束编辑

我在Java8上使用Spring MVC Web应用程序并在tomcat7.x上运行它.Spring版本是:4.2.6.RELEASE和javax servlet版本是:3.0.1

的context.xml

...

<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
    <!-- max upload size in bytes -->
    <property name="maxUploadSize" value="5242880" /> <!-- 5MB -->

    <!-- max size of file in memory (in bytes) -->
    <property name="maxInMemorySize" value="1048576" /> <!-- 1MB -->

</bean>

...
Run Code Online (Sandbox Code Playgroud)

controller.java

...
@RequestMapping(method = RequestMethod.POST, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@ResponseStatus(value = HttpStatus.CREATED)
public void importTranslations(@RequestParam (name = "myfile") MultipartFile myfile) {
    myService.doSomething(myfile);
}
...
Run Code Online (Sandbox Code Playgroud)

这是问题所在

我使用Postman发送*.zip文件.路径是正确的,一切看起来都不错,但是spring会抛出异常:"所需的MultipartFile参数'myfile'不存在"

这是Postman的截图: …

java spring tomcat multipartform-data postman

2
推荐指数
1
解决办法
5569
查看次数