且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用带有c#的asp.net上传xml文件

更新时间:2023-10-07 22:36:04

你好,



而不是尝试将您的简历存储在XML中本身将其存储在磁盘上,并仅将该名称存储在XML中。您可以使用以下逻辑来组织硬盘上的简历。



1.为每条记录生成一个唯一的序列号。

2获取数字的十六进制等值。

3.如果数字小于256,则容器文件夹命名为00(每个文件夹将包含255个文件),它自己将用作的十六进制数字文件名)这将允许您有255个文件夹,每个文件夹包含255个文件(65,025个文件)。 255个文件夹将创建一个所谓的存储库/存储桶。

4.扩展上面的逻辑,或许每桶有255个桶(1,65,81,375)个文件。 255桶将允许4,22,82,50,625个文件。



现在所有文件都整齐有序,只需使用唯一的数字标识符即可轻松访问。



问候,
Hello,

Instead of trying to store your resume in XML itself store it on the disk and only store the name in XML. You can use following logic to organize the resumes on your hard disk.

1. For each record generate a unique sequence number.
2. Get the hex equivalent of the number.
3. If the number is less than 256 then container folder is named as 00 (Each folder will contain 255 files) the hex number it self will serve as the file name) This will allow you to have 255 folders each containing 255 files (65,025 files). 255 folders will create a so called repository/bucket.
4. Extend the above logic to have 255 buckets (1,65,81,375) files a barrel perhaps. 255 barrel's will allow 4,22,82,50,625 files.

All files are now organized neatly and can be accessed easily using just the unique numeric identifier.

Regards,