mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
fix s3 migration (#8890)
This commit is contained in:
parent
985a8c3720
commit
047070c5b3
@ -37,9 +37,7 @@ export async function up(_next) {
|
|||||||
urls = urls.filter((url) => url.startsWith('/uploads'))
|
urls = urls.filter((url) => url.startsWith('/uploads'))
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('URLS uploaded:')
|
console.log('URLS uploaded:')
|
||||||
await Promise.all(
|
for await (const url of urls) {
|
||||||
urls
|
|
||||||
.map((url) => async () => {
|
|
||||||
const { pathname } = new URL(url, 'http://example.org')
|
const { pathname } = new URL(url, 'http://example.org')
|
||||||
// TODO: find a better way to do this - this is quite a hack
|
// TODO: find a better way to do this - this is quite a hack
|
||||||
const fileLocation =
|
const fileLocation =
|
||||||
@ -69,10 +67,8 @@ export async function up(_next) {
|
|||||||
const [updatedUrl] = updatedRecord.records.map((record) => record.get('url') as string)
|
const [updatedUrl] = updatedRecord.records.map((record) => record.get('url') as string)
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(updatedUrl)
|
console.log(updatedUrl)
|
||||||
return updatedUrl
|
// return updatedUrl
|
||||||
})
|
}
|
||||||
.map((p) => p()),
|
|
||||||
)
|
|
||||||
await transaction.commit()
|
await transaction.commit()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user