MCPcopy Index your code
hub / github.com/Threadfin/Threadfin / ThreadfinRestoreFromWeb

Function ThreadfinRestoreFromWeb

src/backup.go:204–226  ·  view source on GitHub ↗
(input string)

Source from the content-addressed store, hash-verified

202}
203
204func ThreadfinRestoreFromWeb(input string) (newWebURL string, err error) {
205
206 // Base64 Json String in base64 umwandeln
207 b64data := input[strings.IndexByte(input, ',')+1:]
208
209 // Base64 in bytes umwandeln und speichern
210 sDec, err := b64.StdEncoding.DecodeString(b64data)
211
212 if err != nil {
213 return
214 }
215
216 var archive = System.Folder.Temp + "restore.zip"
217
218 err = writeByteToFile(archive, sDec)
219 if err != nil {
220 return
221 }
222
223 newWebURL, err = ThreadfinRestore(archive)
224
225 return
226}
227
228// ThreadfinRestoreFromCLI : Wiederherstellung über die Kommandozeile
229func ThreadfinRestoreFromCLI(archive string) (err error) {

Callers 1

WSFunction · 0.85

Calls 2

writeByteToFileFunction · 0.85
ThreadfinRestoreFunction · 0.70

Tested by

no test coverage detected