如何在Windows应用程序中上传文件 [英] how do i upload files in a windows application

查看:130
本文介绍了如何在Windows应用程序中上传文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows应用程序中上传文件.我希望能够指向.doc,.pdf等文本文件并将其上传到我的数据库.

how do i upload files in a windows application. I want to be able to point to text files like .doc, .pdf etc and upload them to my database. how do i go about doing that in a windows application.

推荐答案

看看FileFileStream类以读取文件.对它们的处理方式取决于您如何保存它们.

如果只想将它们复制为BLOB或类似形式,则只需进行流二进制读取即可.如果您需要提取信息,则需要解析它们或执行从文件中提取信息所需的一切.
Take a look at the File and FileStream classes to read the files. What you do with them depends on how you are going to save them.

If you just want to copy them as BLOB''s or similar, just do a stream binary read. If you need to extract information, then you''ll need to parse them or do whatever it takes to extract the info from the files.


检查此处 [
Check this[^] thread out.
See here[^] as well.


这篇关于如何在Windows应用程序中上传文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆