]> git.proxmox.com Git - pve-storage.git/commitdiff
api: upload: add pattern to tmpfilename parameter
authorFriedrich Weber <f.weber@proxmox.com>
Thu, 4 May 2023 09:13:34 +0000 (11:13 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 May 2023 06:43:30 +0000 (08:43 +0200)
The `tmpfilename` is generated by pve-http-server and always adheres
to this pattern, so make this explicit to prevent confusion and have
a more complete JSON API schema, useful for e.g., the API viewer.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
 [ T: slightly extended commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Storage/Status.pm

index e028423f3c5cebaabc1320380e3608e1f2b6326f..e4ce6982ec7760aa1f1e8cf59799a3dd6e079048 100644 (file)
@@ -405,6 +405,7 @@ __PACKAGE__->register_method ({
                description => "The source file name. This parameter is usually set by the REST handler. You can only overwrite it when connecting to the trusted port on localhost.",
                type => 'string',
                optional => 1,
+               pattern => '/var/tmp/pveupload-[0-9a-f]+',
            },
        },
     },