// import env from '#start/env'
// import app from '@adonisjs/core/services/app'
import { defineConfig, services } from '@adonisjs/drive'

const driveConfig = defineConfig({
   
    default: 'public',
    

    services: {
  
      /**
       * Persist files on the local filesystem
       */
      public: services.fs({
        location: '/storage/app/public/',
        serveFiles: true,
        routeBasePath: '/public',
        visibility: 'public',
      }),
      local: services.fs({
        location: '/storage/app/data/',
        serveFiles: true,
        routeBasePath: '/data',
        visibility: 'public',
      }),
    
  
      /**
       * Persist files on Digital Ocean spaces
       */
    //   spaces: services.s3({
    //     credentials: {
    //       accessKeyId: env.get('SPACES_KEY'),
    //       secretAccessKey: env.get('SPACES_SECRET'),
    //     },
    //     region: env.get('SPACES_REGION'),
    //     bucket: env.get('SPACES_BUCKET'),
    //     endpoint: env.get('SPACES_ENDPOINT'),
    //     visibility: 'public',
    //   }),
    },
  })
  
  export default driveConfig