add download_path property to managed_stream
This commit is contained in:
parent
af94687d45
commit
68ed9f4ffc
1 changed files with 4 additions and 0 deletions
|
@ -120,6 +120,10 @@ class ManagedStream(ManagedDownloadSource):
|
|||
def mime_type(self):
|
||||
return guess_media_type(os.path.basename(self.descriptor.suggested_file_name))[0]
|
||||
|
||||
@property
|
||||
def download_path(self):
|
||||
return f"{self.download_directory}/{self._file_name}" if self.download_directory and self._file_name else None
|
||||
|
||||
# @classmethod
|
||||
# async def create(cls, loop: asyncio.AbstractEventLoop, config: 'Config',
|
||||
# file_path: str, key: Optional[bytes] = None,
|
||||
|
|
Loading…
Reference in a new issue