Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to be able to upload files with relative path #47

Open
dguayrobotiq opened this issue Mar 28, 2018 · 4 comments
Open

Add an option to be able to upload files with relative path #47

dguayrobotiq opened this issue Mar 28, 2018 · 4 comments

Comments

@dguayrobotiq
Copy link

Reading through the Sentry doc and their forum, sometimes it's mandatory to upload files with ~ instead of the full path with host and protocol.

So instead of uploading the files like:
https://xxx.cloudfront.net/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js

it should be uploaded as:
~/assets/vendor-7d31c95933a91ffe617f81efb6478c75.js

This allow to ignore the the host and protocol. This can be useful in some case for example, when you want to access assets from multiple origins.

@dschmidt
Copy link
Owner

So what you need is a mechanism/config option to replace part of the paths with something different?

@dguayrobotiq
Copy link
Author

Yes. It could be a simple useRelativePath flag option I guess? In that case, you get the files from the distDir and then you replace host and protocol by ~ if the flag is true. By checking the code, that could be done in the _uploadFile function?

@dguayrobotiq
Copy link
Author

@dschmidt I found the option --url-prefix in Sentry documentation that could help: https://docs.sentry.io/learn/cli/releases/#upload-source-maps

@dschmidt
Copy link
Owner

Okay cool, but that seems to be a feature of the cli and not a documentation of the api endpoint we're using. Anyway this shouldn't be too hard to implement. Mind sending a PR?

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 a pull request may close this issue.

2 participants