Is there a possibility in 'File upload' component to add a file without using the 'onFileReceived' event?
My requirement is like, whenever the view is opened, it will fetch the file (ByteArray) from the database and should be binded to the 'File upload' component.
Why? That seems non-sensical. You already have the file in the database why are you trying to bind it to the File Upload component?
I am actually trying to replicate a record in database, the file is one of the column of the database.
So, the user will see the existing data, and do changes if required and re-create it.
I do have a workaround, but just wondering if there is such a functionality!
You need to be much clearer about what you are trying to do.
trying to replicate a record
replicate verb /ˈrɛplɪkeɪt/ make an exact copy of; reproduce.
and do changes if required and re-create it.
So it's not a replicate. It's an edited copy.
What is the database column type?
How will it be edited?
The image column is 'varbinary' in database.
Either the user will use the same image or they will upload new image and once confirmed, it will create a new record in database with whatever the user selected.
Either the user will use the same image ...
In which case there is no need to download or to upload.
... or they will upload new image ...
In which case they need to use the file upload component as normal.
From your original question:
Is there a possibility in 'File upload' component to add a file without using the 'onFileReceived' event?
No. You need to tell the gateway what to do with the file. How would it know otherwise?