import { getRealPath } from '@dcloudio/uni-platform' export const API_SAVE_FILE = 'saveFile' export type API_TYPE_SAVE_FILE = typeof uni.saveFile export const SaveFileOptions: ApiOptions = { formatArgs: { tempFilePath(savedFilePath, params) { params.tempFilePath = getRealPath(savedFilePath) }, }, } export const SaveFileProtocol: ApiProtocol = { tempFilePath: { type: String, required: true, }, }