Allow using URL as archive source when creating functions (#1360)
In the case of large files, it takes a long time for the user to download the source from the URL and upload it to StorgeSvc through CLI. This PR allows a user to use URL as the function source when creating a function and provides a new flag "--keeparchiveurl" to let the user to decided whether the CLI should download the file first or store the file URL in the archive directly. If "--keeparchiveurl" is true, then no checksum will be generated, it's the user's responsibility to ensure the file won't be changed.
This commit is contained in:
@@ -146,7 +146,7 @@ func (opts *DumpSubCommand) do(flags cli.Input) error {
|
||||
if !nozip {
|
||||
defer os.RemoveAll(tempDir)
|
||||
path := filepath.Join(outputDir, fmt.Sprintf("%v.zip", dumpName))
|
||||
_, err := utils.MakeArchive(path, tempDir)
|
||||
_, err := utils.MakeZipArchive(path, tempDir)
|
||||
if err != nil {
|
||||
fmt.Printf("Error creating archive for dump files: %v", err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user