mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-10 15:55:01 +00:00
misc: revert changes.
Signed-off-by: Marco Attia <54147992+Vaneixus@users.noreply.github.com>
This commit is contained in:
parent
6a7137fbac
commit
e1d8cb097a
@ -662,14 +662,13 @@ func fileGetContentType(ctx context.Context, d *schema.ResourceData, c proxmox.C
|
|||||||
ext := strings.TrimLeft(strings.ToLower(filepath.Ext(sourceFilePath)), ".")
|
ext := strings.TrimLeft(strings.ToLower(filepath.Ext(sourceFilePath)), ".")
|
||||||
|
|
||||||
switch ext {
|
switch ext {
|
||||||
case "iso":
|
case "img", "iso":
|
||||||
contentType = "iso"
|
contentType = "iso"
|
||||||
case "yaml", "yml":
|
case "yaml", "yml":
|
||||||
contentType = "snippets"
|
contentType = "snippets"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We cannot determine, for example, the content type of an .img file, so we require the user to specify it.
|
|
||||||
if contentType == "" {
|
if contentType == "" {
|
||||||
return nil, diag.Errorf(
|
return nil, diag.Errorf(
|
||||||
"cannot determine the content type of source \"%s\" - Please manually define the \"%s\" argument",
|
"cannot determine the content type of source \"%s\" - Please manually define the \"%s\" argument",
|
||||||
|
Loading…
Reference in New Issue
Block a user