fix plugin uploading

This commit is contained in:
zznty
2023-04-26 17:00:50 +07:00
parent 94a06f1946
commit 83a7e4ce24
3 changed files with 3 additions and 3 deletions

View File

@@ -61,6 +61,6 @@ public class PluginsController : WebApiController
file.Data.CopyTo(zipStream); file.Data.CopyTo(zipStream);
return new PluginInfo(manifest.Guid, manifest.Name, manifest.Version); return new PluginInfo(manifest.Guid, manifest.Name, manifest.Version);
}); }).ToArray();
} }
} }

View File

@@ -16,7 +16,7 @@ public static class PluginManifestUtils
public static PluginManifest ReadFromZip(Stream stream) public static PluginManifest ReadFromZip(Stream stream)
{ {
using var archive = new ZipArchive(stream); using var archive = new ZipArchive(stream, ZipArchiveMode.Read, true);
using var entryStream = archive.GetEntry("manifest.xml")!.Open(); using var entryStream = archive.GetEntry("manifest.xml")!.Open();
return Read(entryStream); return Read(entryStream);
} }

View File

@@ -2,5 +2,5 @@
<PluginManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <PluginManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Torch Remote</Name> <Name>Torch Remote</Name>
<Guid>284017F3-9682-4841-A544-EB04DB8CB9BA</Guid> <Guid>284017F3-9682-4841-A544-EB04DB8CB9BA</Guid>
<Version>v1.0.11</Version> <Version>v1.0.13</Version>
</PluginManifest> </PluginManifest>