Fixed uploadNewFile page

main
Inga 🏳‍🌈 14 years ago
parent 4831c7f9ce
commit 86842daafa
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Builder/IISUploadHandler/build.txt
  3. 2
      IISMainHandler/HandlersFactory.cs
  4. 2
      IISMainHandler/handlers/request/UploadHandler.cs
  5. 4
      templates/Full/UploadNew.xslt

@ -93,6 +93,8 @@ namespace FLocal.IISHandler {
return new handlers.request.ReplyHandler();
case "newthread":
return new handlers.request.CreateThreadHandler();
case "upload":
return new handlers.request.UploadHandler();
default:
return new handlers.WrongUrlHandler();
}

@ -21,7 +21,7 @@ namespace FLocal.IISHandler.handlers.request {
}
protected override XElement[] Do(WebContext context) {
HttpPostedFile file = context.httprequest.Files["uploaded"];
HttpPostedFile file = context.httprequest.Files["file"];
if(file == null) throw new FLocalException("file not uploaded");
if(file.ContentLength != file.InputStream.Length) throw new FLocalException("file is not uploaded completely");
Upload upload = UploadManager.UploadFile(file.InputStream, System.IO.Path.GetFileName(file.FileName), DateTime.Now, context.session.account.user, null);

@ -20,8 +20,8 @@
</tr>
<tr>
<td class="lighttable">
<form method="post" action="/do/Upload/">
<input type="file" name="uploaded" class="formboxes" /><br/>
<form method="post" action="/do/Upload/" enctype="multipart/form-data">
<input type="file" name="file" class="formboxes" /><br/>
<input type="submit" name="buttlogin" value="Îòïðàâèòü!" class="buttons" />
</form>
</td>

Loading…
Cancel
Save