We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54f501c commit 63b7641Copy full SHA for 63b7641
web/documentserver-example/csharp/WebEditor.ashx.cs
@@ -451,11 +451,18 @@ private static void Reference(HttpContext context)
451
452
if (fileName == "" && userAddress != "")
453
{
454
- var path = (string)body["path"];
455
- path = Path.GetFileName(path);
456
- if (File.Exists(_Default.StoragePath(path, userAddress)))
+ try
457
458
- fileName = path;
+ var path = (string)body["path"];
+ path = Path.GetFileName(path);
+ if (File.Exists(_Default.StoragePath(path, userAddress)))
459
+ {
460
+ fileName = path;
461
+ }
462
463
+ catch {
464
+ context.Response.Write("{ \"error\": \"Path not found!\"}");
465
+ return;
466
}
467
468
0 commit comments