Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,368,011
Community Members
 
Community Events
168
Community Groups

Bitbucket export - process inline images

A customer of ours wanted to get all information stored in the issue tracker.

The export seemed to work very well at first. The json structure is great, easy to understand and complete. However, a bit later we noticed a problem.

When there's an inline image, we get something like this https://bitbucket.org/repo/ag22Epng/images/113876413-image.png (I changed the numbers a bit, it's just to illustrate it). When I open this in the browser, I'm being redirected to an amazon s3 storage. I understand that this happen due to security reasons.

Unfortunately, that also makes it a bit harder to process inline images and store them in a local folder. What is the best approach to download the whole issue tracker, not only issues meta data and attachments, but also inline pictures?

1 answer

0 votes

Hi Remo,

Unfortunately, there is no way to download these images with the export option in the issue tracker.

I have reached out to the development team to ask if it's possible to get them programmatically using the URLs in the json, as I'm facing some errors when I attempt to do this with one of my issue trackers for testing purposes.

I'll let you know as soon as I have an update.

Kind regards,
Theodora

Hi Remo,

I spoke with one of the developers, and I'm afraid that inline images in the issue tracker can only be accessed via the browser at the moment and downloaded manually from the browser. We need a bit more time to figure out if it's a quick fix to make it possible to download them programmatically e.g. via curl or if it's going to be a more involved project.

Kind regards,
Theodora

Hi Theodora,

thanks for following up on this. While not very elegant, we can copy the cookie from the browser and use that in curl. I'm not sure about the expiration or any other security check in place, but we'll give it a try. At least one picture I managed to download by setting the copying the cookie.

Thanks,
Remo

Hi Remo,

Thank you for your reply.

After further testing, I'm afraid that there is no quick fix to allow app password authentication for these image URLs. The only workaround at the moment is by using the cookie, as you figured out yourself as well. The cookie should be treated as though it were an account password and kept as private as possible; I have asked about expiry and if there are any other concerns about using it, I'll keep you updated.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events