Code Monkey home page Code Monkey logo

Comments (6)

jaxuk avatar jaxuk commented on August 11, 2024 2

This isn't an issue for me anymore in the latest version.

from ngx-input-file.

rsaenen avatar rsaenen commented on August 11, 2024 1

What kind of files do you browse ?
Can you show your code ?

from ngx-input-file.

rsaenen avatar rsaenen commented on August 11, 2024 1

I am not able to reproduce, can you try to reproduce this issue with the demo of this repository ?
Clone this repo, then npm i --no--save and npm start.

Can you paste your ng -v output ?

from ngx-input-file.

victorj2307 avatar victorj2307 commented on August 11, 2024

Yeah, Sure... I'm browsing for Excel files...

In my Html file:

            <div class="form-group">
                <label for="file">Select Spreadsheet to Upload</label>
                <input-file inputId="file" inputAccept=".xls,.xlsx,.cvs" [disableUpload]="true" inputMaxFiles="1" [(model)]="inputFileModel"
                    [textBrowse]="'Browse'" [textFileSelected]="'File selected'" [textNoFile]="'No file selected'"
                    [textRemove]="'Remove'" (acceptedFile)="onAcceptFile($event)" (removedFile)="onRemoveFile($event)">
                </input-file>
            </div>

In my Component:

import { Component, ViewEncapsulation, Inject, OnInit } from '@angular/core';
import { InputFileOptions, InputFileRepository } from 'ngx-input-file';
import { any } from '@uirouter/angularjs';

@Component({
  selector: 'form-component',
  template: require('./form.html'),
  styles: [require('./form.scss')]
})

export class FormComponent implements OnInit {
  public onAcceptFile(evt: any) {

    console.log(evt.data);

  }

  public onRemoveFile(file: any): void {
    console.log('File removed', file);
  }
}

And in my Module:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { HttpModule, JsonpModule } from '@angular/http';
import { FormComponent } from './form.component';
import { InputFileModule } from 'ngx-input-file';

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    CoreModule,
    HttpModule,
    InputFileModule,
    ReactiveFormsModule
  ],
  exports: [
    InputFileModule
  ],
  declarations: [FormComponent]
})
export class BatchFormModule {
...
}

from ngx-input-file.

jaxuk avatar jaxuk commented on August 11, 2024

I get the same error upon uploading.

from ngx-input-file.

rsaenen avatar rsaenen commented on August 11, 2024

Same questions, what is your angular version ou can you reproduce it with the demo?

from ngx-input-file.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.