5
我遇到問題uploading multiple file to different urls using ng2-file-upload method
。使用ng2-file-upload將多個文件上傳到不同網址
我使用此回購https://github.com/valor-software/ng2-file-upload 來做到這一點。 ng2-file-upload
可以使用此demo輕鬆集成到我的應用中以上傳文件。此外,他們還提供了一個method來上傳特定網址上的多個文件。我想上傳different files at different url
,我現在還找不到。
// sample code
import { Component } from '@angular/core';
import { FileUploader } from 'ng2-file-upload';
const URL = '/api/some_url';
@Component({
selector: 'simple-demo',
templateUrl: './simple-demo.html'
})
export class SimpleDemoComponent {
public uploader:FileUploader = new FileUploader({url: URL}); // here to add url
}
這FileUploader
提供的方式給url
上傳文件。這種方法的有用之處在於,progress-bar
和相關功能與此ng2-file-uploader
組件集成在一起。我搜索了很多,但無法找到任何解決方案上傳到不同的網址。
任何有用的建議將不勝感激!
感謝@sabu,它的工作完美! :) –