feat: Sample Tag Viewer — read-only tag browser for AKAI disk images #17
@@ -309,6 +309,19 @@ func handleDiskPartitions(w http.ResponseWriter, r *http.Request) {
|
|||||||
writeJSON(w, map[string]any{"error": "missing iso parameter"})
|
writeJSON(w, map[string]any{"error": "missing iso parameter"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fi, err := os.Stat(iso)
|
||||||
|
if err != nil {
|
||||||
|
writeJSON(w, map[string]any{"error": fmt.Sprintf("cannot access %q: %v", iso, err)})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if fi.IsDir() {
|
||||||
|
writeJSON(w, map[string]any{"error": fmt.Sprintf("%q is a directory, not an ISO file", iso)})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !strings.HasSuffix(strings.ToLower(fi.Name()), ".iso") {
|
||||||
|
writeJSON(w, map[string]any{"error": fmt.Sprintf("%q is not an ISO file", iso)})
|
||||||
|
return
|
||||||
|
}
|
||||||
parts, err := listPartitions(iso)
|
parts, err := listPartitions(iso)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
writeJSON(w, map[string]any{"error": err.Error()})
|
writeJSON(w, map[string]any{"error": err.Error()})
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@
|
|||||||
<h2 class="section-toggle" data-section="tag-body">Tag Viewer <span class="toggle-icon">▾</span></h2>
|
<h2 class="section-toggle" data-section="tag-body">Tag Viewer <span class="toggle-icon">▾</span></h2>
|
||||||
<div id="tag-body">
|
<div id="tag-body">
|
||||||
<div class="tag-controls">
|
<div class="tag-controls">
|
||||||
<input type="text" id="tag-iso-path" placeholder="ISO file path" value="./output/isos">
|
<input type="text" id="tag-iso-path" placeholder="./output/isos/YOUR_ISO.iso" value="">
|
||||||
<button id="tag-browse-btn">Browse</button>
|
<button id="tag-browse-btn">Browse</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="tag-results" style="display:none">
|
<div id="tag-results" style="display:none">
|
||||||
|
|||||||
Reference in New Issue
Block a user