文件上传 - MultipartResolver实现

时间:2017-02-17 12:40:26

标签: grails

我正在抛弃旧的问题内容,​​因为它过于复杂。 现在很简单。

如何从标准中更改multipartResolver:

org.springframework.web.multipart.support.StandardServletMultipartResolver

org.springframework.web.multipart.commons.CommonsMultipartResolver

我没有使用Grails v3.2.6这样做。

我尝试过这里提到的各种事情(声明bean,过滤器,禁用MultipartAutoConfiguration):

1 个答案:

答案 0 :(得分:0)

不确定更改实现但我确实必须将application.yml中的相应配置设置更改为某些类似...

$(window).on('load', function() {
  var isPlaying = false;
  var sound_files = [new Howl({
      src: ['http://download.quranicaudio.com/verses/Sudais/mp3/001001.mp3'],
      loop: false
    }),
    new Howl({
      src: ['http://download.quranicaudio.com/verses/Sudais/mp3/001002.mp3'],
      loop: false
    }),
    new Howl({
      src: ['http://download.quranicaudio.com/verses/Sudais/mp3/001003.mp3'],
      loop: false
    })

  ];

  var play_button = $('#play-button'),
    pause_button = $('#pause-button'),
    shift_preset = $('#preset-changer');

  for (var i = 0; i < sound_files.length - 1; ++i) {
    sound_files[i].on('end',
      (function(i) {
        return function() {
          sound_files[i + 1].play();
        }
      }(i))
    );
  }
  sound_files[i].on('end', function() {
    isPlaying = false;
  })

  play_button.click(function() {
    if (!isPlaying) {
      isPlaying = true;
      sound_files[0].play();
    }
  });

  function playTrack(index) {
    console.log("playing " + index);
    sound_files[index].play();
    sound_files[index].once('end', function() {
      if (index < sound_files.length - 1)
        playTrack(index + 1);
      else
        isPlaying = false;
    });
  }

  //});
});