![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jul 2005
Posts: 2
Rep Power: 0
![]() |
Upload file without using <INPUT TYPE="FILE">
Is that any solution to upload a file without using the Input type="file" ?
The browser I need to handle now cannot support pop up window. So I cannot use the FILE type since it need to browse the file with the pop up window. Can I know any other way to upload the file? Thank you |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Cross posting contravenes the forum rules. Please read them.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Expert Programmer
|
Try this
Try making something like a hyperlink
<a href="name of file if in the same folder"> Name of Link </a> If you dont have the file in the same folder than you should try something like this <a href="c:/foldername/filename.whatever"> Name of Link </a> Sorry if i am completely of target but i hope that helps. Last edited by crawforddavid2006; Jul 31st, 2005 at 8:33 PM. Reason: needed to add on |
|
|
|
|
|
#4 |
|
Professional Programmer
|
Well first of all, I don't know why a browser that blocks pop-ups would block a Browse... dialog -- that's interaction with the OS's API, not HTML.
Furthermore, if you need to upload a file, you can use one of those type="file" boxes and just type in the name, like C:\myfile.ext That's all browsing for the file would do, anyways.
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
#5 |
|
Professional Programmer
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 317
Rep Power: 4
![]() |
Using a link to a file on the user's local filesystem; like:
<A href="C:\foo.txt"> won't work for obvious privacy/security reasons. What happens instead is that the user, on following the link, sees that local file rendered in their browser (assuming their browser, like most, can open local files this way). This can be disorientating for users, since they get the impression that file has somehow gone to your website (particularly if you use a frameset) but it's just a prank and has no useful applications that I know of, really; the file stays on their machine. There isn't really a way to upload a file without using <INPUT type="file">, since that's the only way you can get the browser to send a file and the server to receive one. (Make sure you set the form's encoding to "multipart/form-data" when using this feature, by the way; probably won't solve your problem but it's inefficient to do otherwise and who knows, some browsers might make defective upload fields if the form's encoding is the default ("application/x-www-form-urlencoded" I think)). One way to get a signficant amount of essentially textual data from the user's machine to the server would be to have the user paste it into a TEXTAREA and POST it. That's the only other idea I can think of - failing something elaborate like a Java applet (which would have to be trusted to access the user's filesystem anyway). Hope this helps. |
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
PHP makes this simple.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 | |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Quote:
|
|
|
|
|
|
|
#8 | ||
|
Professional Programmer
|
Quote:
Quote:
![]()
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|