Ask coding questions

← Back to all posts
download single files
WikingGaffa (70)

My python script outputs a .txt file... I want to download just the .txt file. Is there a way to do this?
I only get the "download as zip". But I only need the one file (and I dont always have have zip opener ready on the pc -depends where I am).
I know I can just copy/paste the content of the .txt. -but that is extra clicks/time wasted.

Comments
hotnewtop
HappyFakeboulde (237)

I don't think there's a way to do this currently in repl.it. However, I, too, would be interested in such a possiblity.
I will upvote this in the hope that the repl.it team will see it.

timmy_i_chen (1151)

This shouldn't be too hard to do. I can tackle this early next week.

AncientBison (67)

@timmy_i_chen Can you share the code please.

RaidingShaman (0)

I can give you two solutions:

  • Start an ExpressJS server with static serving on
    • After starting an ExpressJS server with static serving on the root, go to the file link your browser.
    • Save the file via pressing ctrl + s
  • Upload the file with g drive api or any other cloud uploading api

You may use any of them. I did not use the 2nd one but I am pretty sure, that'll work.

I hope these trick helped you.
So do not forget to upvote this.