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

uploadLabel is not working on basic mode of the FileUploadModule module #12019

Closed
ruskovweb opened this issue Oct 8, 2022 · 6 comments · Fixed by #12040
Closed

uploadLabel is not working on basic mode of the FileUploadModule module #12019

ruskovweb opened this issue Oct 8, 2022 · 6 comments · Fixed by #12040
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@ruskovweb
Copy link
Contributor

ruskovweb commented Oct 8, 2022

Describe the bug

I am using the FileUploadModule in basic mode and the uploadLabel prop is not working. It shows the file name instead of my custom label.

 <p-fileUpload
      mode="basic"
      accept="image/*"
      chooseIcon="pi pi-folder-open"
      chooseLabel="Browse"
      styleClass="border-round-lg"
      uploadLabel="Upload"
      [multiple]="false"
      [customUpload]="true"
      [maxFileSize]="1000000"
      (onSelect)="onSelect($event)"
      (uploadHandler)="upload()"
    >
    </p-fileUpload>

Environment

Firefox 102.3.0esr (64-bit)

Reproducer

No response

Angular version

~14.0.0

PrimeNG version

^14.0.0-rc.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.15.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@ruskovweb ruskovweb added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 8, 2022
@volvachev
Copy link
Contributor

Hi, uploadLabel works only for advanced mode, for basic use chooseLabel.

@ruskovweb
Copy link
Contributor Author

I am using the chooseLabel but it is for a different button. I can't change the label of the upload button.

@volvachev
Copy link
Contributor

I am using the chooseLabel but it is for a different button. I can't change the label of the upload button.

There's only one button in this mode - it can't be both choose and upload - so it seems to me. Do you want uploadLabel instead of the name of the uploaded file?

@ruskovweb
Copy link
Contributor Author

Yes I want a custom label instead of the uploaded file name.

@ruskovweb
Copy link
Contributor Author

The chooseLabel works as expected:
image

but the upload button label can't be changed:
image

I can change the icon of that button with uploadIcon, but I can't change its label.

@volvachev
Copy link
Contributor

I see your point, I am preparing a pull request for your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants