本文介绍了如何删除文件的元数据C#特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

,我已经搜索了很多关于这一点,但没有找到任何解决办法(可能是我与错误的关键词搜索),但问题是我想删除文件属性其中包含特殊字符。请检查连接的图像是我想说的。

I am trying to find solution to this from last 2 hours, I have searched a lot on this but didn't found any solution(may be I am searching with wrong keywords), but the problem is I want remove file properties which contain special characters. Please check attached image for what I want to say.

我使用ASP.NET FileUpload控件和C#作为编程语言。我想确保上传过任何文件不包含在其属性中的任何特殊字符。

I am using ASP.NET FileUpload control and C# as programming language. I want to make sure that any file uploaded does not contain any special characters in its properties.

请帮忙。

感谢。

推荐答案

您是否尝试过通过 Image.PropertyItems

您可以修改图像通过 GetPropertyItem() SetPropertyItem()

You can modify the image to remove unwanted details via GetPropertyItem() and SetPropertyItem()

参考:

样在这里StackOveflow:
图像属性

Sample here in StackOveflow:Value of image property (C#)

这篇关于如何删除文件的元数据C#特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 16:05