473,729 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2415
What upload object are you using to handle the uploads? It depends on that.
Check the documentation for the component.

Dundas upload example:

oUpload.GetFile Name(oFile.Orig inalPath)

Ray at work
<ri**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.h tm</title>
<script type="text/javascript">
function upload() {
var file = document.form1. filepath.value;
if (file == "") return false;
var what = file.substr(fil e.lastIndexOf(" \\")+1);
document.form1. filename.value = what;
alert(what); // for testing
return true;
}
</script>
</head>
<body>
<form action="" method="post" name="form1" onsubmit="retur n 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**********@g mail.com> wrote in message
news:11******** **************@ z34g2000cwc.goo glegroups.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
3154
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 other page, or is there something else like a stream which will be like a file. I am attempting to get a way from writing out a file and then having to give the page that I am posting to the file name. Instead I would like to just from asp.net...
5
2734
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
1214
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
2550
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 system is separate with front-end web site (2) Need to re-size user-uploaded image file to same size (3) Need to rename file name to avoid duplicate name (4) How to design directory and file structure to increase disk I/O performance (5) How to...
4
12621
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: <input id="biopic" name="biopic" type="file" />
2
1558
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 ....please tell me. Here is the code: <html> <head>
2
1487
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 upload folder that i created in working directory and not in the database. Now when someone enters the search page and enters the search criteria the name of the users with that criteria are listed. When i ckick on the name of any user then his details...
14
1847
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 random numbers / letters as the filename and uploaded to a folder. - That random file name will be stored in the database along with the users username - When the user logs in they will see a list of their files that they can download and they...
1
3207
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 code for attachment, I am not able to send anything. I get blank email. Can you please help me on this? Here is the html form:
0
8928
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8766
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9217
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9158
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4799
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2698
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2171
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.