MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / extractModelFromZip

Function extractModelFromZip

main.js:6860–6886  ·  view source on GitHub ↗
(zipPath, entryPath, destinationPath = null)

Source from the content-addressed store, hash-verified

6858 filePath,
6859 finalFileName,
6860 filteredMetadata.designer || null,
6861 filteredMetadata.parentModel || null,
6862 filteredMetadata.notes || null,
6863 filteredMetadata.license || null,
6864 dateAdded
6865 );
6866
6867 results.push({ filePath, success: true, action: 'created' });
6868 successCount++;
6869 } else {
6870 // Update existing model - overwrite all fields
6871 db.prepare(`
6872 UPDATE models
6873 SET designer = ?, parentModel = ?, notes = ?, license = ?
6874 WHERE filePath = ?
6875 `).run(
6876 filteredMetadata.designer || null,
6877 filteredMetadata.parentModel || null,
6878 filteredMetadata.notes || null,
6879 filteredMetadata.license || null,
6880 filePath
6881 );
6882
6883 results.push({ filePath, success: true, action: 'updated' });
6884 successCount++;
6885 }
6886 } else {
6887 results.push({ filePath, success: false, error: 'No metadata found in 3MF file' });
6888 noMetadataCount++;
6889 }

Callers 6

startHttpServerFunction · 0.85
calculateFileHashFunction · 0.85
main.jsFile · 0.85
extract3MFMetadataFunction · 0.85
readModelFileHandlerFunction · 0.85
parse3mfPreviewHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected