1

I'm trying to resize the standard modal which is shown after I click on the < lightning-file-upload > tag and select images.

The reason for this is because when a page is zoomed in on a phone browser and user clicks on this tag, the modal will appear too enlarged and user won't be able to click any button and scroll anywhere.

Is there a good way to reduce the size of this modal?

this is the Upload Files modal

enter image description here

3
0

Not the direct answer to your question. However, I think you can try with <lightning:input type="file"> alternative for lightning-file-upload which should not give issue with phone browser.

<template>
    <lightning-input type="file"
                     label="Attachment"
                     accept="image/png, .zip"
                     onchange={handleFilesChange}
                     multiple>
    </lightning-input>
</template>

lightning-input type="file" handles file selection only and you must have your own file upload implementation, such as wiring up your component to an Apex controller that handles file uploads. Alternatively, use the lightning-file-upload component for an integrated way to upload files to records.

Update

Though with this approach there would be limitations around file size as @kawadragon also noted that.

Check this for limitations.

2
  • Thank you for your answer. I tried this solution, but I could not use this tag because the file data size limit of lightning:input is smaller than lightning-file-upload.
    – Kawadragon
    Sep 17 at 1:41
  • Yes , was aware , I should have mentioned that. Will update that to answer. Sep 17 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.