Reply to Re: how to show "browse for folder" dialog in html/javascript?

Your name:

Reply:


Posted by Amit C on 10/18/04 11:29

Hiii..
I am also facing a similar problem.
My Problem :
I want the user to select one particular file, and the rest of the
files of similar formats should be uploaded automatically.without user
selecting them. I know that we cant assign value to the file control.
So I created ActiveX Object WScript.Shell. object and used the method
sendkeys() to write the path of the file to a hidden file control. Now
I was able to upload a 100 file together when the client and server
were in the same domain.
Now, My server will reside in different domain,. so the IE which
accesses the server is not allowing the form to get submitted.

I hope I have been clear in expressing the problem,
Hoping for a quick reply.
Thanks in Advance.

Martin Kurz wrote:
> Jonathan N. Little schrieb:
>
> >>> I'm just saying the form could send the file list data then the
> >>> receiving CGI on the server can make the fit connection and upload
> >>> the files. It's this how those cookie-cutter server-side site
> >>> building apps lik work, or webmail form's attachment routines work?
> >>
> >>
> >>
> >> I have never used either so I couldn't answer that. Can you give URL's
> >> to either?
> >
> >
> > Neither had I, but I had seen folks with Hotmail and Yahoo accounts and
> > the webmail , essentially a form in a browser, seem to use the
> > input='file' to browse for attachments and would build a list on the
> > page similar to what I was describing. Just speculating, but that was
> > how I thought they did it.
>
> No way. I've seen lots of browser based applications. There are generally two
> methods submitting files to the server:
>
> First one is by using the HTML-File-Input-Field. There's only one possibility
> uploading files with this: The user has to browser for each single file and
> submit the form.
>
> The second one is using something like a java applet doing the upload. If the
> user allows the applet to browse the local disc and submit data (there's allways
> a security warning from Java-Sandbox when trying this), you can upload mutliple
> files or a folders content by this applet (have a look for JUpload on
> sourceforge ie).
>
> But because of security restrictions in browsers, there's no way in setting the
> file by JS or predefining the file on the server (like allready multiple times
> mentioned).
>
> >> I have read in the last week or so where an XMLHTTPRequestObject might
> >> be able to upload files but I would think that would be a security
> >> violation as well, for the same reasons.
> >>
> >
> > Never used function, just learning PHP, but there are a slew of PHP
> > functions for FTP. Onced logged on the server, did not think the fopen()
> > command that reads the local file had to get the filename from a form's
> > input='file'. You can hand type source, or hardcode in script to then be
> > uploaded via ftp_fput(), right?
>
> Even if you're having the filename an dpath on teh server, really getting the
> file from the client by using file something like FTP requires three things:
> First, the client must have a connectable FTP-Server running. Second: You're in
> need of an account to connect to the FTP-Server on the client. And the third
> thing: you have to find the right file (FTP-Path != absolute Filepath).
>
> So in very few cases, you could transfer data to the server this way. But in
> allmost all cases, this won't working.
>
> martin

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация