-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Uploading a video in a medium trust environment fails with the following error:
System.Security.Permissions.SecurityPermission
Exception message: The path is not of a legal form.
Stack trace:
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.NormalizePath(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.FileInfo..ctor(String fileName)
at Viddler.Videos.VideosNamespaceWrapper.Upload(String title, String tags, String description, Nullable`1 makePublic, String localPath, Boolean useEndPoint)
Problem comes from the GetMimeType method in ViddlerHelper.cs
It is not possible to link the urlmon.dll in a medium trust environment
Changing the method to
internal static string GetMimeType(Stream fileStream) {
return "application/octet-stream";
}
fixes this problem.
Thanks for your great job.
Metadata
Metadata
Assignees
Labels
No labels