fix(gitlab): fetch media library images through API (#1433)
This commit is contained in:
committed by
Shawn Erquhart
parent
a4ba66e1a6
commit
83d2adc0be
@ -52,7 +52,6 @@ export default class API {
|
||||
processFile = file => ({
|
||||
...file,
|
||||
name: basename(file.path),
|
||||
download_url: file.links.self.href,
|
||||
|
||||
// BitBucket does not return file SHAs, but it does give us the
|
||||
// commit SHA. Since the commit SHA will change if any files do,
|
||||
|
@ -209,7 +209,7 @@ export default class Bitbucket {
|
||||
const sem = semaphore(MAX_CONCURRENT_DOWNLOADS);
|
||||
|
||||
return this.api.listAllFiles(this.config.get('media_folder')).then(files =>
|
||||
files.map(({ id, name, download_url, path }) => {
|
||||
files.map(({ id, name, path }) => {
|
||||
const getBlobPromise = () =>
|
||||
new Promise((resolve, reject) =>
|
||||
sem.take(() =>
|
||||
@ -220,7 +220,7 @@ export default class Bitbucket {
|
||||
),
|
||||
);
|
||||
|
||||
return { id, name, getBlobPromise, url: download_url, path };
|
||||
return { id, name, getBlobPromise, path };
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user