Access uploaded document properties?

G

Guest

Hello! I'm trying to find out if it's possible to access the properties of
an document uploaded via the fileupload control? The end goal is to
dynamically insert the number of pages in a document into a database field
when the file is uploaded, along with the filename and mime property.

TIA!
 
R

Rad [Visual C# MVP]

Depends ... what sort of document are you talking about? Word? PDF?
Publisher?
 
G

Guest

The upload limits files to word, excel, ppt and pdf (for the most part)
--
Morgan
Web Developer
Portland, Oregon
 
S

Steven Cheng[MSFT]

Hello Morgan,

For those documents like word, excel, pdf, they're of binary format,
based on my research, it will require us launch the document's processing
application interface to get those properties(like calling Office COM
object through automation). However, it will be a bit expensive and not
recommended to do this in an server-side application like ASP.NET web
application.

BTW, do you think it possible that we use a rich client interface to let
the user upload such document? For example, use an ActiveX control to let
user upload such document, thus we can gain more control over the document
at client-side through some strong code(e.g automation through COM
interface). How do you think ?

Please feel free to post here if you have any other ideas or consideration.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Rad [Visual C# MVP]

I agree. I tried something like this a while back and run into a
myriad of issues, ranging from mysterious messageboxes appearing on
the server and several dozen instances of winword.exe running that
failed to close!

Perhaps with the new Office 2007 you might be able to do this more
efficiently, but then again it will be a while before the new format
gains adoption.

In the meantime, does your scenario involve some level of trust in the
user? If so it may be an idea to avail a text box as well and ask them
to key in the number of pages which you can then use as an estimate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top