How to Fileupload Video at Angular 4?

Asked

Viewed 32 times

0

I created a API Java to fileupload any file, it’s something simple, it just takes any selected image and sends to C: images, I’m using with Angular 4, my goal is to make this implementation with video, but I had tried before with images as they are easier to find available codes and ready with image implementation.

I went to do with video and it didn’t work, I believe it’s something I should change in my Angular Front-end. So 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 this is 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 to make the change? please!

  • 1

    <p-fileUpload> is not a tag HTML5. You can specify which framework you are using?

  • 1

    and can also explain better what did not work

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.