Skip to content

added download method#7

Merged
pradeeban merged 3 commits intoControlCore-Project:devfrom
amit-62:dev
Jul 7, 2022
Merged

added download method#7
pradeeban merged 3 commits intoControlCore-Project:devfrom
amit-62:dev

Conversation

@amit-62
Copy link
Contributor

@amit-62 amit-62 commented Jul 6, 2022

No description provided.

fri/test.py Outdated
# or
def download():
url = "http://127.0.0.1:5000/download/test?fetch=f1.txt&apikey=xyz"
webbrowser.open(url)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are opening a web browser in the call to the download() method. I think you should just receive the HTTP Response stream and save it as a file. Check how this is handled in CONTROL-CORE Mediator:

def ctl(dir=None):

This may be more complex than just opening the browser.

Python has the means to save the HTTP response streams to enable the download() options without relying on an external webbrowser.

@amit-62 amit-62 closed this Jul 7, 2022
@amit-62 amit-62 reopened this Jul 7, 2022
@pradeeban pradeeban merged commit 15b20c8 into ControlCore-Project:dev Jul 7, 2022
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

Successfully merging this pull request may close these issues.

2 participants