简体   繁体   English

Telerik的StoreFile(FileBrowser内容提供程序)覆盖它

[英]StoreFile for Telerik (FileBrowser Content Provider) override it

I am overriding below method of Telerik (FileBrowser Content Provider) to deal with Saving File on disk and Object Storage AWS 我覆盖下面的Telerik(FileBrowser Content Provider)方法来处理在磁盘和对象存储AWS上保存文件

public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
{
    return base.StoreFile(file, path, name, arguments);
}

The path paramater of StoreFile works fine in case of file saving to disk but in case of Object Storage AWS it does not. 在将文件保存到磁盘的情况下,StoreFile的路径参数工作正常,但是在对象存储AWS的情况下,它不起作用。 Scenario - if path is like '/Object/Stack OverFlow'/ it works fine for disk but for object storage it gives same path as '/Object' , it ignores folder with (Space, Special characters etc.) 方案-如果路径类似于'/ Object / Stack OverFlow'/,则对于磁盘工作正常,但对于对象存储,它的路径与'/ Object'相同,它将忽略带有(空格,特殊字符等)的文件夹

How to get this complete path in case of Object Storage AWS ? 在对象存储AWS的情况下如何获取完整路径?

For the path use the Path class instead of string and then you can use Path.Combine and if it's still not working then you need to use verbatim strings. 对于路径,请使用Path类而不是字符串,然后可以使用Path.Combine,如果仍然无法使用,则需要使用逐字字符串。 just add @ in front of the string and then it ignores the special characters. 只需在字符串前面添加@,然后它会忽略特殊字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM