import request from '@/utils/request';
import config, { getUploadUrl } from '@/config/config';
import { getToken } from '@/utils/authority';
import { getSysCode } from '@/webPublic/one_stop_public/Table/giveSmartFormGlobalProps';

const uploadUrl = getUploadUrl();

export default function uploadFile(params) {
	return request(uploadUrl, {
		method: 'POST',
    headers: {
      Authorization: `bearer ${getToken()}`,
      sysCode: getSysCode(),
    },
		body: params,
	});
}
