Browsing for files from a browser?
I have a tabular html form where users can enter a number of titles and file specifications in columns. Having the users actually ENTER the full filespec (path AND filename) has proven problematic so I'd like to give them a way to browse around the local system on which the browser is running, and select the file. When done, they hit Submit and the filespec get sent to php along with everything else on the form.....
It sounds like you are wanting a multiple file upload table? Why do you need the client side folder path info of the file anyway?
Wow. This is really depressing. Its 2010 and I'm finding out just how limited and primitive the Internet environment and tools are. But, it is what it is....
>It sounds like you are wanting a multiple file upload table? Why do you need the client side folder path info of the file anyway?
Good question. Let me back up and describe what's going on....
This is partially automating a currently manual process.
Photographer wants to enter a competition. They have 1 - n digital images in jpeg files. These image files need to be emailed to the person in charge of the competition. This form provides a way to enter the image title and the file specification, and press a button to email the files as attachments. The person in charge wants a SINGLE email from the competitor, with the list of titles and the set of images.
I've got the form. I've got the email. The problem is getting the file specifications. Having these users ENTER the entire file spec for every one of their images is going to guarantee a lot of errors, which is why it's desirable to provide an alternative.
What do you mean file specifications? Like file size and such?
You could adjust your process a bit:
1) Present upload form for a single image
2) When file upload succeeds present 2 options: Upload another, or complete
3) If upload another repeat from 1
4) Else construct email
File specification in this case is just the regular filename and path....
So, if the file is p:\photo\derivatives\drv_080_20081020\some_image_name.jpg
I want the whole thing because its needed for the email attachment...
>You could adjust your process a bit:
>1) Present upload form for a single image
>2) When file upload succeeds present 2 options: Upload another, or complete
>3) If upload another repeat from 1
>4) Else construct email
How would that resolve the issue of wanting to use a file browser to get the filespec? There's no upload, just a "send an email with your files attached".
You need to upload the file to the server and attach it to the email sent by your server side processing. You don't need the full path for that at all. How are you sending the email currently (using a mailto href possibly)?
Could be another thing I've missed... Currently I'm running everything locally, and using the php "mail" command once I've built the message. I hadn't thought about the problem of once the php is sitting on the web host it doesn't have access to the files sitting on the user's local pc...... Phooey!
OK. I'll just have to persevere in php...... Which is getting more grotesque by the moment.... Now when the user hits the "send email" button they're going to have to wait while 3 - 4 MB of files get uploaded, then wait while the php email does the processing and emails... Yuck...
As I suggested above it might be best to have them upload all there files before getting to the final step of the process.
I understand the idea of copying each file to the server as the user puts in the filespec, but since the form has a fixed number of rows the user can enter all their images before hitting Submit and sending everything to php.
I'm probably being obtuse, but I can't believe this is the first time in the history of the Internet that someone has needed to get filespecs (full path and filename) and email the files from a user's system. Is there really no simple, standard, straightforward way to browse for filespecs into fields on a form and send the files as email attachments using the user's regular email engine? Or AT LEAST send email from the client-side form with attachments...
How does everybody else get their users to consistently, accurately enter file information if we can't use a file browser?
I"m struggling with the whole idea of actually having dozens of users accurately entering filespecs, copying large files (and these are SMALL files at 500K each, a normal image would be larger) from the user's computer up to the web host, have the files sitting around on the web host, sending them as attachments using "mail" (which appears to be synchronous and very slow), and then have to clean up umpteen megabytes of image files that are sitting around taking up space on the web host... There HAS to be a more efficient way.....
Is my whole process defective? Do I need to do something drastically different?
It is not plausible to send emails client side from a web page (a Java application or other stand alone client app is a different story). The user would have to wait for the email to be sent (meaning the images would have to upload anyway) whether the email was sent client-side or server-side so that is an invalid argument.
This is usually done with an email client application (i.e. Outlook, Thunderbird, etc) not through a web page.
I can't believe this is the first time in the history of the Internet that someone has needed to get filespecs (full path and filename) and email the files from a user's system.
Most people have the user upload files to the server and construct the emails server-side. In fact, it makes the most sense to store the images on the server and only include links to them in the emails...just saying.
How does everybody else get their users to consistently, accurately enter file information
If you are only appending them to emails you can remove them from the file system as soon as the email is sent.
and then have to clean up umpteen megabytes of image files that are sitting around taking up space on the web host
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)