Html imagezilla api失败

Html imagezilla api失败,html,api,Html,Api,我正在尝试创建一个页面,使用他们的api将图像上传到imagezilla,但没有成功。下面是我正在使用的代码,但由于明显的原因,没有apikey、用户名和密码 <html> <body> <form action="http://imagezilla.net/api.php" method="post"> <input type="file" name="file" accept="image/x-png, image/gif, image/jp

我正在尝试创建一个页面,使用他们的api将图像上传到imagezilla,但没有成功。下面是我正在使用的代码,但由于明显的原因,没有apikey、用户名和密码

<html>
<body>
<form action="http://imagezilla.net/api.php" method="post">
    <input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
    <input type="hidden" name="apikey" value="..." />
    <input type="hidden" name="username" value="..." />
    <input type="hidden" name="passwordmd5" value="..." />
    <input type="hidden" name="testmode" value="1" />
    <input type="submit" />
</form>
</body>
</html>

我一直得到的回报是没有上传任何文件,即使我取消了测试模式,它仍然会这样做。
该网站的帮助不大

任何帮助都会很好。Jamie

虽然我没有使用Imagezilla的经验,但我怀疑您需要正确设置表单的
enctype

<form action="http://imagezilla.net/api.php" method="post" enctype="multipart/form-data">
    <input type="file" name="file" accept="image/x-png, image/gif, image/jpeg" />
    <input type="hidden" name="apikey" value="..." />
    <input type="hidden" name="username" value="..." />
    <input type="hidden" name="passwordmd5" value="..." />
    <input type="hidden" name="testmode" value="1" />
    <input type="submit" />
</form>


尝试为表单设置正确的
enctype
。谢谢,BenM的工作非常出色