handle wh file uploads

This commit is contained in:
Matt Hill
2025-08-27 10:06:39 -06:00
parent b7438ef155
commit c5fa09c4d4

View File

@@ -131,17 +131,13 @@ export default class GatewaysComponent {
handler: async (input: typeof spec._TYPE) => {
const loader = this.loader.open('Saving').subscribe()
console.log('FILE', input.config.value.file)
console.log(
'FILE STRINGIFIED',
JSON.stringify(input.config.value.file),
)
try {
await this.api.addTunnel({
name: input.name,
config: '' as string, // @TODO alex/matt when types arrive
config:
input.config.selection === 'paste'
? input.config.value.file
: await (input.config.value.file as any as File).text(),
public: input.type === 'public',
})
return true