You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, getFileView/Download/Preview return byte arrays.
This will force the user to wait for the whole download to be complete, before he gets a response from the client call.
Also, the whole file will be held in RAM.
Reduced Memory Usage:
Streaming allows data to be processed in smaller chunks rather than loading the entire content into memory.
Handling Large Files:
Streaming is particularly useful for handling large files, such as videos or high-resolution images. It allows applications to start playing or displaying content without waiting for the entire file to be downloaded
🎤 Pitch
I see two possible ways to implement this feature:
Simply replace ByteArray with InputStream -> WILL BREAK COMPATIBILITY
Add three functions, suffixed with "Streamed" for example, enabling users to choose between ByteArray and InputStream without breaking their current implementations."
Make use of generics, allowing the user to specify the return type: getFileDownload<InputStream>() (Maybe not possible for every language)
In my case, i added a new function getFileStream to the Android SDK that returns an InputStream instead of a byte array. joern-h/sdk-for-android@60d10be
👀 Have you spent some time to check if this issue has been raised before?
🔖 Feature description
Currently, getFileView/Download/Preview return byte arrays.
This will force the user to wait for the whole download to be complete, before he gets a response from the client call.
Also, the whole file will be held in RAM.
Previously, i ran into issues downloading big files: appwrite/sdk-for-android#44
Here are some pros for this feature:
Streaming allows data to be processed in smaller chunks rather than loading the entire content into memory.
Streaming is particularly useful for handling large files, such as videos or high-resolution images. It allows applications to start playing or displaying content without waiting for the entire file to be downloaded
🎤 Pitch
I see two possible ways to implement this feature:
ByteArray
withInputStream
-> WILL BREAK COMPATIBILITYByteArray
andInputStream
without breaking their current implementations."getFileDownload<InputStream>()
(Maybe not possible for every language)In my case, i added a new function
getFileStream
to the Android SDK that returns an InputStream instead of a byte array.joern-h/sdk-for-android@60d10be
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: