Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Force download of ipynb

Karan Vaswani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 10, 2023

I am storing ipynb Jupyter notebook files. I want to use the link to the file to auto download to the computer. What change do I need to make to the URL to force that? 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 11, 2023

G'day Karan!

Welcome to the Bitbucket Cloud Community :)

May I confirm first - do you want to download files from your repository source? Or from the Downloads section that is found in Repository Settings > Downloads

Cheers!

- Ben (Bitbucket Cloud Support)

Karan Vaswani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 16, 2023

From the repository source

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 17, 2023

Hi Karan,

Unfortunately, there is no effective method for downloading specific groups of files from the repository source using a URL alone as authentication needs to take place, therefore using our /2.0/repositories API is the recommended method.

For example - here is a CURL command that will download a given file from your repository source. It will work with any extension of file that is present in your repository. You would need to specify your username and App Password (for auth purposes) as well as the workspaceID, repositoryslug, branch and filename:

curl -L -u <username>:<AppPassword> https://api.bitbucket.org/2.0/repositories/<workspaceID>/<repositoryslug>/src/<branchname>/<filename>.<ext> --output <destinationfilename>.<ext>

However, by taking a look at the URL used in the API query, you can modify this slightly to have a static link that will open in a browser outside of the API (as long as you have an actively logged-in session with Bitbucket Cloud). The problem here is - if it is a text-based file this will preview in the browser by default, whereas only non-text files will download automatically. This is why I believe it would not work for your Jupyter notebook files specifically:

https://bitbucket.org/!api/2.0/repositories/<workspaceID>/<repositoryslug>/src/<branchname>/<filename>.<ext>

Hope this helps, @Karan Vaswani 

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events