Hi, im trying to update an Image component through StreamResouce. but i have the problem. the Image is not displayed from StreamResource. (i’ve checked the directory path and its correct).
With this I can not exactly debug what the issue is, but you might want to use a ByteArrayInputStream and read the file using Files.readAllBytes(imageFilePath).
So instead of the return new FileInputStream(file) have it as return new ByteArrayInputStream(Files.readAllBytes(imageFilePath)); as that will not leave the FileInputStream open as your current code does.
So, i tried using new Image Component (the code i show it to you is being used by Uploader. but i dont think i can’t use 1 Image Component with 2 different Source. first is from byte64 data, and the second one is from StreamResource. ) and it working. i have no idea why image component can’t get source from different source type.
anyway. noow im using 2 image component (1 from Byte64 and another one using StreamResource). but i’ll try your advice later. thank you