Inversion of control for a streaming upload provider
See original GitHub issueI need a way to proxy streaming uploads, that is to forward bytes from the client as soon as they are received, without temp files. To do that, I need to have a file-like object given to the provider for reading - as opposed to the provider giving the request server a file-like object for writing.
I am thinking something along the lines of checking for a flag in doPUT
, and if the provider prefers, just give it the reference to environ["wsgi.input"]
for reading.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
Custom providers | NestJS - A progressive Node.js framework
Dependency injection is an inversion of control (IoC) technique wherein you delegate instantiation of dependencies to the IoC container (in our case, the...
Read more >Processing Files With Java 8 Streams - Reflectoring
Inversion of control (IoC) is simply providing a callback (reaction) to an event that might happen in a system. In other words, instead...
Read more >Dependency injection in Android | Android Developers
Note: Dependency injection is based on the Inversion of Control principle in which generic code controls the execution of specific code.
Read more >Spring Interview Questions and Answers | DigitalOcean
Spring IoC container manages Spring Bean life cycle and project-specific configurations such as JNDI lookup. Spring MVC framework can be used to ...
Read more >Inversion of Control Containers and the Dependency Injection ...
Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mar10, I have made another change to use generators, and I have isolated the code that writes to the file object in the small method
processData
. This can be overridden, for example, to just hand over the stream to the file object, so that the provider can read from it or forward it to a networking library. https://github.com/mar10/wsgidav/pull/51/commits/ebb0e99f1ec4a1d418a8aaf47424db8e490d9fc0@samuelfekete could add some lines to the docstring of
StreamingFile
, maybe a small example how to use it?