Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling slow/async store #28

Closed
TopperDEL opened this issue Apr 30, 2018 · 2 comments
Closed

Handling slow/async store #28

TopperDEL opened this issue Apr 30, 2018 · 2 comments

Comments

@TopperDEL
Copy link

Hi,

I try to implement a WebDAV-Store, that loads data from another library from the net. That library provides the result only as a file on my file-System (temp-file). So whenever a user selects a file in my store, I Need to fetch the complete file first to my local hard drive and Can then provide a file-stream on it.

Is there any way to create a Kind of async-filestream that provides new data-chunks whenever they got written to the temp-file? I'm a bit lost, currently and appreciate any help.

Thank you!

Kind regards,

TopperDEL

@ramondeklein
Copy link
Owner

If the library only provides an option to download the file to disk and doesn't allow stream-based access, then it's difficult to accomplish this. If the other library doesn't lock the file for reading, then you could try to start reading from the stream chunk-by-chunk and have some kind of notification that the file has been written completely. You need to create an intermediate-stream to provide this functionality, because the default file-stream will probably not allow this.

I understand that it's not possible to get a stream from your third-party library, but this is actually the only decent solution. If possible, contact the library's creator and ask for stream-based access.

@TopperDEL
Copy link
Author

Thank you for your quick Reply! I will evaluate if a stream-based Access is possible. Maybe I get it working with an intermediate stream.

Closing this issue, as it is only work on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants