Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use the library to edit the repository #104

Open
juanitourquiza opened this issue Nov 23, 2021 · 0 comments
Open

How use the library to edit the repository #104

juanitourquiza opened this issue Nov 23, 2021 · 0 comments

Comments

@juanitourquiza
Copy link

I used the library to create and is working perfectly but when I use the library to modify the register replaces every image.

afuConfig = {
    uploadAPI: {
      url: `${environment.images}`
    },
    theme: "dragNDrop",
    multiple: true,
    formatsAllowed: ".jpg,.png,.jpeg",
    maxSize: 10,
    autoUpload: false,
    replaceTexts: {
      selectFileBtn: 'Select Files',
      resetBtn: 'Reset',
      uploadBtn: 'Update Images',
      dragNDropBox: 'Drag N Drop',
      attachPinBtn: 'Attach Files...',
      afterUploadMsg_success: 'Successfully Uploaded !',
      afterUploadMsg_error: 'Upload Failed !',
      sizeLimit: 'Size Limit'
    }
  };
DocUpload(evt: any){
    this.project.imagenes = evt.body.data;
    this.generalService.loadUser().subscribe(
      (res: any) => {
        this.user = res.data.id;
        if(this.project.title == '' || this.project.clave == ''){
          alert('Please fill all the fields');
          return;
        }
        this.generalService.updateProject(this.project, this.idProject, this.project.imagenes).subscribe((results: any) => {
          alert('You updated successful project');
          this.router.navigate(['../dashboard']);
        });
      },
      data => {
        this.errorMessage = data.error.errors[0].message;
        alert(this.errorMessage);
        this.router.navigate(["/"]);
      }
    );
  }

What is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant