Skip to content

Commit

Permalink
Fix non-native uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Oct 24, 2024
1 parent 9670a0d commit 57de2dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions cml_qa_tests_dummy
Submodule cml_qa_tests_dummy added at f8b8b4
6 changes: 4 additions & 2 deletions src/cml.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,14 @@ class CML {
({ mime, uri } = await upload(opts));
}

if (!rmWatermark) {
if (!rmWatermark && !native) {
const [, type] = mime.split('/');
uri = watermarkUri({ uri, type });
}

uri = preventcacheUri({ uri });
if (!native) {
uri = preventcacheUri({ uri });
}

if (md && mime.match('(image|video)/.*'))
return `![](${uri}${title ? ` "${title}"` : ''})`;
Expand Down
2 changes: 1 addition & 1 deletion src/drivers/gitlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class Gitlab {

const { url } = await this.request({ endpoint, method: 'POST', body });

return { uri: `${await this.repoBase()}${url}`, mime, size };
return { uri: url, mime, size };
}

async runnerToken(body) {
Expand Down

0 comments on commit 57de2dc

Please sign in to comment.