bitbucket-file-uploader is a Chrome & Firefox extension that adds file upload function to bitbucket server web interface.
It adds a slide-out to the repository's file browser where you can simply drag'n'drop files to be uploaded.
It automatically creates a pull-request that adds the uploaded file to the current opened directory in the repository
(see screenshots below) for the master
branch
When uploading a file to a branch other than master
the file is added as part of a new commit without opening a
pull-request. This way it is also possible to upload multiple files as part of a single pull-request by uploading all
subsequent files to the branch created by uploading the first file.
The web interface shipped with bitbucket server by default lacks this very useful feature and apparently it is not planned to be included by Atlassian, see https://bitbucket.org/site/master/issues/12656/upload-images-or-binary-files-to-the-repo.
Currently, the extension is not published in any public repository like Chrome Store or Firefox Add-ons, thus you have to build the extension yourself and manually activate it as an extension in your browser.
Prerequisites:
- You need npm installed locally
git clone https://github.com/e-solutions-GmbH/bitbucket-file-uploader.git
cd bitbucket-file-uploader
npm install
npm run build
- Navigate to
chrome://extensions
. - Check the box next to Developer Mode.
- Choose "Load unpacked extension".
- In the dialog, open the directory
bitbucket-file-uploader/dist/chrome
. - On the top right (next to the address bar) click on the bitbucket-file-uploader icon and choose "Options".
- Input the base url of your Bitbucket (e.g.
https://bitbucket.mycompany.de
) and click "Update".
- Navigate to
about:debugging#addons
to load add-on. - Click "Load Temporary Add-on".
- In the dialog, open the directory
bitbucket-file-uploader/dist/ff
and select themanifest.json
file. - Navigate to
about:addons
to open Add-ons Manager. - Choose "Options" for Bitbucket File Uploader.
- Input the base url of your Bitbucket (e.g.
https://bitbucket.mycompany.de
) and click "Update".
Below are some goals of this project (in order of priority):
- Build as standard web extension to support most common browsers (chrome, firefox, ...) with a single code base
- Support configuration for every local bitbucket environment (bitbucket home url)
- Support easy-to-use, well integrated user interface for file uploads, including drag'n'drop
- MVP that supports straight forward use-case: drag'n'drop a file into browser triggers creation of corresponding pull-request in the project
- Provide comprehensive documentation in GitHub how to build and run the extension locally
- Replace generic icons with custom ones
- Improved build infrastructure with shared base manifest file that is merged with browser specific ones and support for other OS (Windows,...)
- Support for multiple files to be uploaded in one pull-request
- Support to add file(s) uploaded to an existing pull request
- Do not hardcode default target branch to
master
- Publish the extension in Chrome Store / Firefox Add-ons etc.