* refactor: use fastify vite for the server by doing this we do not need to have local hacks for the routes. No local proxy needed. Everything just works. * fix: update the dockerfile build path * fix: update package.json * fix: fonts path
25 lines
568 B
JavaScript
25 lines
568 B
JavaScript
import config from 'config';
|
|
import * as disk from './disk.js';
|
|
// It is using the s3 package, which means it works for s3 buckets as well
|
|
import * as digitalocean from './do.js';
|
|
|
|
function fileAdapter() {
|
|
const adapter = config.get('file.adapter');
|
|
|
|
if (adapter === 'do') {
|
|
return digitalocean;
|
|
} else if (adapter === 'disk') {
|
|
return disk;
|
|
} else {
|
|
return {
|
|
upload: () => {},
|
|
download: () => {},
|
|
remove: () => {},
|
|
};
|
|
}
|
|
}
|
|
|
|
const adapter = fileAdapter();
|
|
|
|
export default adapter;
|