English 中文(简体)
联合国
原标题:SQL: Saving MIME-Type or Extension?

什么是将关于巴解组织的信息储存在非行的最佳途径? The file-Extension (.txt, .rar) or the MIME-Type?

此外,情况较好: 保存档案名称或无延伸(“档案”或“档案”)?

我主要谈的是桌面应用程序,而不是网络应用。

最佳回答

如果我们谈论的是文件上载储存,例如,我总是储存以下领域:

  • File - varbinary(MAX)
  • FileName - nvarchar(255) (including file extension, for example "myfile.txt")
  • FileType - nvarchar(255) (the MIME type)

如果是基于网络的应用程序,则监评类型很重要,你希望在某个时候允许下载文件。 有了“监测和评价”类型,你就可以告诉浏览器如何最好地处理档案。

因此,对你的问题的直接回答是,节省“监测和评价”的类型和延期。 原因是,你无法确保正确的档案延期,因此,你需要监听系统类型,以确定档案类型。 但是,你应当把延期事宜与档案名称一起存放,以便你能够在下载时提供有效的档案名称。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签