import { Base64 } from 'js-base64';
import website from '@/config/website';
import { getToken } from '@/utils/auth';

export function getUploadHeaders(extraHeaders = {}) {
  return {
    ...extraHeaders,
    [website.tokenHeader]: `bearer ${getToken() || ''}`,
    Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
    'Blade-Requested-With': 'BladeHttpRequest',
  };
}
