feat: add metadata and preview (#292)

* chore: upload flow uses metadata object and has preview

* chore: remove SwarmFile

* feat: upload metadata and file preview

* feat: add metadata and preview on download

* fix: package the meta and preview files

* fix: upload websites that are inside a folder (#296)

* fix: upload websites that are inside a folder

* docs: few comments to clarify what is going on

* refactor: decrease local variables and fix state order to detect websites properly

Co-authored-by: Cafe137 <aron@aronsoos.com>
This commit is contained in:
Vojtech Simetka
2022-01-26 18:29:09 +01:00
committed by GitHub
parent 57bff96c99
commit f4013142af
11 changed files with 321 additions and 167 deletions
+15
View File
@@ -21,3 +21,18 @@ interface StatusEthereumConnectionHook extends StatusHookCommon {
interface StatusTopologyHook extends StatusHookCommon {
topology: Topology | null
}
interface SwarmMetadata {
size: number
name: string
type?: string
}
interface Metadata extends SwarmMetadata {
type: string
isWebsite: boolean
count?: number
hash?: string
}
type FilePath = File & { path?: string; fullPath?: string }