Skip to main content
Known Participant
Sep 27, 2022 1:33 PM UTC
Question

A null parameter has been passed error on File Upload Component

Hi All,

We are facing the errow : A null parameter has been passed as parameter 1 at function a!fileUploadField.

Is anyone aware what can be the possible scenario for this error?

Kindly advise.

Thanks and Regards,
Diksha

    13 replies

    gabriele.camilli
    Employee
    Sep 27, 2022 1:48 PM UTC

    Hi,

    could you share the code? It would be helpful to understand the error

    dikshagAuthor
    Known Participant
    Sep 28, 2022 6:28 AM UTC

    This is the code snippet. Strangely, this error is only faced by one of the users and others are able to upload files as expected.

    a!fileUploadField(
    target: cons!FILE_UPLOAD_FOLDER,
    maxSelections: 1,
    filenames: fv!file.name &"_APN_"&loggedInUser(),
    value: local!fileUpload,
    saveInto: { local!fileUpload,
    a!save( ri!fileUpload, save!value),
    a!save( ri!fileName,save!value)
    },
    validations: {}
    )

    stefanhelzle0001
    Brainy
    Sep 28, 2022 6:53 AM UTC

    Is there a specific reason to store the value into three different rule inputs/locals?

    Is this problem specific to that user in general, or a specific file this user wants to upload. In the latter case, please check whether that file has a size larger zero bytes.