Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > how can i upload image via http ?

how can i upload image via http ?
Thread Tools
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Laval, Québec, Canada
Status: Offline
Reply With Quote
Jan 7, 2002, 02:58 AM
 
so .. i want to do like hotmail when you do an attachement.. you know ?.. .. it ask you to browse the file.. and add it to your email....

so i want to do the same thing exept.. that will not send by email.. but by ftp or something like that..
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jan 7, 2002, 09:58 AM
 
Well using FTP you'd use a PUT command.
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Jan 7, 2002, 06:03 PM
 
what platform you using?

It is very possible to do this with asp on NT (i've done this before), i think also with php if you are a unix-guy. If you're using asp i could probably help you out

A file-field is a standard form element that most browsers support:

<form action="upload.asp" method="post" ENCTYPE="multipart/form-data">
<input type="file" name="filefield">
</form>

You probably won't recognise the enctype bit in the FORM tag. This tells the server it's not just text data coming in. The file "upload.asp" contains the good stuff. Grabs the filename and directory of the local file, transfers it upstream over http onto the server.

What do you need to do with these uploaded files? Do they stay on the server or do they need to go someplace else?

[ 01-07-2002: Message edited by: derbs ]
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jan 8, 2002, 09:53 AM
 
excellent derbs!

also, if on NT, since the user is anonymous, you have to make sure the anonymous user has change (or write) permissions for a special directory that you make for all file uploads (unless you want trouble).

-raman
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Jan 8, 2002, 10:55 AM
 
good point =)

[ 01-08-2002: Message edited by: derbs ]
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jan 8, 2002, 06:01 PM
 
Nice to see someone in here with some real-world knowledge..
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Jan 9, 2002, 03:42 AM
 
do you work in the web industry Raman?
     
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Laval, Québec, Canada
Status: Offline
Reply With Quote
Jan 21, 2002, 02:09 PM
 
i do form command... and i have my cgi..

but.. i cant execute the cgi... why ?!

try this :
http://hete.dyndns.org:8080/fup.html
     
Senior User
Join Date: May 2001
Location: Nottingham, UK
Status: Offline
Reply With Quote
Jan 22, 2002, 04:22 AM
 
hi

can't access your website - is your computer turned off?

have you made sure the file is executable? (chmod 755)[/LIST]
     
Forum Regular
Join Date: Jan 2002
Location: japan
Status: Offline
Reply With Quote
Jan 27, 2002, 05:24 AM
 
If you are using ASP you will need to have a custom upload com installed on the NT server - only then will any of your forms/upload scripts actually write to the server.

If there is no com installed you will simply get a fail on
Server.CreateObject

You can do it using pure php - its wholly dependant on what your server supports.
http://www.yongfook.com
     
   
Thread Tools
Forum Links
Forum 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 On
Top
Privacy Policy
All times are GMT -5. The time now is 12:46 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2