I created a Java API to do fileupload from any file, it's something simple, it just takes any selected image and sends it to C: \ images, I'm using it with Angular 4, my goal is to do this with video, but I had tried before with images since they are easier to find available codes and ready with images implementation.
I did it with video and it did not work, I think it's something I should change in my Front-end Angular. Then see the code below;
This is my service;
export class MidiaService {
midiasUrl = 'http://localhost:8080/midias';
constructor(private http: Http) { }
urlUploadAnexo(): string {
return '${this.midiasUrl}/files';
}
And that's my component:
get urlUploadAnexo() {
return this.midiaService.urlUploadAnexo();
}
And this is my page:
<div class="ui-g-6 ui-md-3 ui-fluid">
<label>URL</label>
<p-fileUpload name="files" mode="basic" auto="true" maxFileSize="1000000000000000000000000000"
chooseLabel="Anexar" accept="image/*,application/*"
[url]="urlUploadAnexo"
></p-fileUpload>
</div>
I think the place where I should change to accept video files should be on the page, would anyone have a suggestion how should I make the change? please!