Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Setting a default value for the input type file?

Reply
Thread Tools

Setting a default value for the input type file?

 
 
ramkum@gmail.com
Guest
Posts: n/a
 
      09-21-2006
Hi,

I'm building a system where a presenter uploads a PPT to my server and
then I show it to all the participants. The problem is that most of the
media in the PPT is usually linked, so I'll need to upload all that
too. Assuming I can parse the PPT and figure the exact name and
location of each of the media files I need from his hard-disk, is there
any way I can upload all these files automatically, without having to
make the user choose each of these files manually? If that's not
possible, can I atleast show the user a page with a list of input boxes
of type file, pre-populated with the file-path and name of the media
files I need, so that the user can just click 'Submit' without having
to browse and select each of them?

Please say yes. It would be a major usability crisis if my users had to
keep hitting the browse button so many times for each PPT! Especially
when I know exactly what files I need and where they are! I know that
this has a lot to do with browser security, but there's got to be SOME
way out?

Thanks,

 
Reply With Quote
 
 
 
 
mike.biang@gmail.com
Guest
Posts: n/a
 
      09-21-2006



http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi,
>
> I'm building a system where a presenter uploads a PPT to my server and
> then I show it to all the participants. The problem is that most of the
> media in the PPT is usually linked, so I'll need to upload all that
> too. Assuming I can parse the PPT and figure the exact name and
> location of each of the media files I need from his hard-disk, is there
> any way I can upload all these files automatically, without having to
> make the user choose each of these files manually? If that's not
> possible, can I atleast show the user a page with a list of input boxes
> of type file, pre-populated with the file-path and name of the media
> files I need, so that the user can just click 'Submit' without having
> to browse and select each of them?
>
> Please say yes. It would be a major usability crisis if my users had to
> keep hitting the browse button so many times for each PPT! Especially
> when I know exactly what files I need and where they are! I know that
> this has a lot to do with browser security, but there's got to be SOME
> way out?
>
> Thanks,


Unfortunately, the file input field does not allow you populate it
using default values. This is due to security considerations. Also,
it isn't possible to "grab" files from a users hard drive through an
ASP script processing on the server. Think of the major security
problems that would cause! I could write a script to search the hard
drives of every browser of my site for quickbooks files, etc and upload
them to my server. Fortunately, this isn't possible.

My solution to this problem would be to only allow zip files to be
uploaded (use a script to check the 3 letter file extension of the
uploaded file). Then use a commercially available unzip component to
extract the files into a folder on your server. All this can be done
through an ASP page. Here is a link to an article on unzipping files
in ASP:
http://classicasp.aspfaq.com/general...-from-asp.html

Best of Luck!
Mike Biang
Cramer Development
(E-Mail Removed)

 
Reply With Quote
 
 
 
 
Slim
Guest
Posts: n/a
 
      09-21-2006
Why not use a web dav folder and drag and drop the files in one go?


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
>
> I'm building a system where a presenter uploads a PPT to my server and
> then I show it to all the participants. The problem is that most of the
> media in the PPT is usually linked, so I'll need to upload all that
> too. Assuming I can parse the PPT and figure the exact name and
> location of each of the media files I need from his hard-disk, is there
> any way I can upload all these files automatically, without having to
> make the user choose each of these files manually? If that's not
> possible, can I atleast show the user a page with a list of input boxes
> of type file, pre-populated with the file-path and name of the media
> files I need, so that the user can just click 'Submit' without having
> to browse and select each of them?
>
> Please say yes. It would be a major usability crisis if my users had to
> keep hitting the browse button so many times for each PPT! Especially
> when I know exactly what files I need and where they are! I know that
> this has a lot to do with browser security, but there's got to be SOME
> way out?
>
> Thanks,
>





 
Reply With Quote
 
ramkum@gmail.com
Guest
Posts: n/a
 
      09-21-2006
Thanks a lot, Mike. I guess I'd be better off with a signed Java applet
that does all the uploading for me though; my users wont be too happy
with a zip-up-and-upload approach.


(E-Mail Removed) wrote:
> Unfortunately, the file input field does not allow you populate it
> using default values. This is due to security considerations. Also,
> it isn't possible to "grab" files from a users hard drive through an
> ASP script processing on the server. Think of the major security
> problems that would cause! I could write a script to search the hard
> drives of every browser of my site for quickbooks files, etc and upload
> them to my server. Fortunately, this isn't possible.
>
> My solution to this problem would be to only allow zip files to be
> uploaded (use a script to check the 3 letter file extension of the
> uploaded file). Then use a commercially available unzip component to
> extract the files into a folder on your server. All this can be done
> through an ASP page. Here is a link to an article on unzipping files
> in ASP:
> http://classicasp.aspfaq.com/general...-from-asp.html
>
> Best of Luck!
> Mike Biang
> Cramer Development
> (E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default value for input type file in HTML? ramkum@gmail.com ASP .Net 2 09-21-2006 07:26 PM
Default value for input type file? ramkum@gmail.com HTML 2 09-21-2006 07:20 PM
Pass input Array value to function to calc different input value Susan Cranford Javascript 2 07-05-2005 02:53 AM
tomcat 4.x : setting mime type for a directory or setting a default mime type CJ Java 1 10-29-2004 07:51 PM
Default type-value for template parameter type Ragnar C++ 2 09-04-2003 09:05 AM



Advertisments