473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to send the uploaded file's name???

Hi, Please go through this:

I am having a file (default.asp) on which i am taking many details from
a user before mailing it to someone. I have also provided the user with
a facility of uploading files on a server. I am uploading files from a
page upload.asp which has a link on default.asp. Now my problem is
that, how can i send the file name that is uploaded, in a mail along
with other details that the user enters on default.asp?? In the asp in
which i am sending the email, i am collecting all the details from
default.asp.
Please help....

Mar 6 '06 #1
4 2374
What upload object are you using to handle the uploads? It depends on that.
Check the documentation for the component.

Dundas upload example:

oUpload.GetFileName(oFile.OriginalPath)

Ray at work
<ri**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi, Please go through this:

I am having a file (default.asp) on which i am taking many details from
a user before mailing it to someone. I have also provided the user with
a facility of uploading files on a server. I am uploading files from a
page upload.asp which has a link on default.asp. Now my problem is
that, how can i send the file name that is uploaded, in a mail along
with other details that the user enters on default.asp?? In the asp in
which i am sending the email, i am collecting all the details from
default.asp.
Please help....

Mar 6 '06 #2
<ri**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi, Please go through this:

I am having a file (default.asp) on which i am taking many details from
a user before mailing it to someone. I have also provided the user with
a facility of uploading files on a server. I am uploading files from a
page upload.asp which has a link on default.asp. Now my problem is
that, how can i send the file name that is uploaded, in a mail along
with other details that the user enters on default.asp?? In the asp in
which i am sending the email, i am collecting all the details from
default.asp.
Please help....


Will this help? Remove the "alert()" after testing.

<html>
<head>
<title>fileup.htm</title>
<script type="text/javascript">
function upload() {
var file = document.form1.filepath.value;
if (file == "") return false;
var what = file.substr(file.lastIndexOf("\\")+1);
document.form1.filename.value = what;
alert(what); // for testing
return true;
}
</script>
</head>
<body>
<form action="" method="post" name="form1" onsubmit="return upload()">
<input type="file" name="filepath">
<input type="hidden" name="filename">
<input type="submit" value="Upload">
</form>
</body>
</html>
Mar 6 '06 #3
This code is working fine but the problem is yet to be solved.

See, i have one page as A.asp which has a form for a user to enter the
data. On the A.asp itself, there is a link for upload.asp which lets
the user browse to the files that they want to upload. When the user
has browsed the file, and he clicks the upload button, the
upload_response.asp is called and it uploads the file to the server
using AspUpload component. I have set the overWriteFiles property to be
false. After uploading the file, the user clicks on the 'Done' button
to close the upload window. Then he has to fill some other data on
A.asp. When he is fininshed, he clicks on the 'Submit' button to submit
his form. At this moment, A_response.asp is called which sends the data
which the user has filled in an Email. Now the problem is, I want to
send the uploaded document as an attachment in the Email. I am using
CDO to send the Email. I am able to send all the details which the user
has filled in the form, but i am unable to get the file name for the
file which the user has uploaded.

Please help me.... its urgent.

Mar 8 '06 #4
<ri**********@gmail.com> wrote in message
news:11**********************@z34g2000cwc.googlegr oups.com...
This code is working fine but the problem is yet to be solved.

See, i have one page as A.asp which has a form for a user to enter the
data. On the A.asp itself, there is a link for upload.asp which lets
the user browse to the files that they want to upload. When the user
has browsed the file, and he clicks the upload button, the
upload_response.asp is called and it uploads the file to the server
using AspUpload component. I have set the overWriteFiles property to be
false. After uploading the file, the user clicks on the 'Done' button
to close the upload window. Then he has to fill some other data on
A.asp. When he is fininshed, he clicks on the 'Submit' button to submit
his form. At this moment, A_response.asp is called which sends the data
which the user has filled in an Email. Now the problem is, I want to
send the uploaded document as an attachment in the Email. I am using
CDO to send the Email. I am able to send all the details which the user
has filled in the form, but i am unable to get the file name for the
file which the user has uploaded.

Please help me.... its urgent.


Are four pages really necessary?
A.asp
upload.asp
upload_response.asp
A_response.asp

Or is it five as your first post mentioned
default.asp

First, can you identify the filename of the file to be uploaded
by my technique (or any other)?

Second, if you can then what's the problem --
passing it back to a calling page?

Why not merge all of the pages into one?

You may want to start a new thread and include the following:
a) all the details of your issue
b) stripped down source code that replicates the problem
A reread of your latest post found this:
"Now the problem is, I want to send the
uploaded document as an attachment in the Email"

Does this mean that your original problem is solved
and you have a new problem? It isn't clear.

Is it that the user selects a file to upload
(from their computer to your Web server)
and you want to e-mail it back to them?

If so, then the file is on your server and you should know it's name and
path.

I'm confused as to where you are and what you want.

Mar 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
5
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
0
by: IkBenHet | last post by:
Hello, I use this script to upload image files to a folder on a IIS6 server: ******************* START UPLOAD.ASPX FILE ********************** <%@ Page Language="VB" Debug="true" %>
4
by: RedHair | last post by:
I'd like to set up a file system for the ASP.NET 2.0 application to store user-uploaded files, since the members are more than 100,000 people, the basic requirements are as below: (1) The file...
4
by: lawrence k | last post by:
I've a file that starts like this: <form id="pdsForm" method="post" action="/mcControlPanel.php" class="mcForm" charset="UTF-8" enctype="multipart/form-data" > and it contains this input: ...
2
by: Muddasir | last post by:
Hi All. Anyone plz tell me how can I upload a file with the file name of my choice. am having problem with this, the file got uploaded but not with the name I wanted to...how can I do this...
2
by: agarwalsrushti | last post by:
Hi, I have made a registration form for job site in which the user uploads a .doc or .txt file through form along with the other details stored in the database. The uploaded files is sored in the...
14
by: Jeigh | last post by:
Hello, I'm going to start making a script that will allow users to upload a file, then re download it later. I'll basically be doing the following: - The uploaded file will be given a string of...
1
by: deepaks85 | last post by:
Dear All, I want to send some data through a form with Multiple attachment in an HTML Format. I have tried it but it is not working for me. I am able to send data without attachment but with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.