Why my app crashed when upload a bytearray image?
So I want to upload the image shown in imageView to Firebase Storage, but Firebase Storage only accepts bytearray and uri files when upload. So I converted the imageview into bytearray. The code is working fine but when I upload the picture on my phone, the app crash. Anyone knows why? The code is shown below:
imagePicker = findViewById(R.id.edit_cover_picture)
val bitmap = (imagePicker as BitmapDrawable).getBitmap()
val stream = ByteArrayOutputStream()...