The file uploader code I've been using won't let me use Request.Form and BinaryRead on the same page so I've resorted to having the file upload code on another, seperate page that is spawned from the first. Trouble is, the path to store the file at is determined on the first page and I don't know how to pass it along to the second.
I am not able to save the file path into database remaining everything is working good i can upload the image to the folder and save the data to the database. I am using MySQL database .....
i am having a problem in how to create a Open File dialog to enable user to select a image file that will be stored into database. i just want the file path to be stored in database, not the image.
We face problems uploading excel (with macros) documents using HTML File Upload.
The file contents are corrupted while viewing the same. However, we are able to upload excel (w/o. macros) documents successfully. Is there anything we have to take care of, while handling uploads of excel documents with macros?
I have a problem. I tried my best but could not solve is. I have a page where user selects the folder name from a drop down list. It takes user to show.asp page, where it how all the files in the folder and also user can click on them and download them. If I select name of the folder from the list, on show.asp it shows all the files and their link.
When I click on the link then most of the file which has long name and have space in their names wont be hyper linked. For example if files name is Virus Control.vsd or file name is INCIDENT-ACCIDENT INVESTIGATION REPORT.htm. If I click on them it will say "The page cannot be found". Code:
I have setup a site that allows users to login with a username and a password that are stored in a mysql database, now what i need to do is set it up so the users can only download specific file(s) related to their username. With my current set up using all asp and iis 5.0 all the users can download the same file from a certain directory. I was thinking of somehow using the session variable of the username as a variable in the download path of the file, but i don't know if this is a correct method of doing this or the correct syntax.
This does not seam to work for me in IE, but does in Netscape? What I am trying to accomplish is this.
On the footer of everypage we have a link that opens a comment page, example [<a href="#" onclick="javascript:view_win(/comment/comments2.asp');" class="notes">Send Comments</a>]. I am trying to write asp code to that takes the referering page and then gives the the filepath of that page which searches a database of web authors, and then returns the authors email address. after that I loop to add input sendto's for each one found. Code:
I'm needing some help on this. I need to know how to parse a file path for the file name in a browse box. Lets say I have a browse box in a form with the input of
C:/somedirectory/somefile.asp
I need a piece of code that could convert the input into just somefile.asp?
In my ASP file, located at the "/test" directory of the website, I include another ASP file as below.
<!--#include file="../templates/_header.asp"-->
Inside the _header.asp file, how can I get the current file (_header.asp) directory? I need to get the web relative/absolute directory of _header.asp, but instead even if I can get the physical directory location of that file should be fine.
I tried Request.ServerVariables("") with almost all the variables, but none gave me what I wanted. This is necessory, becase the location of _header.asp and the file which includes that can vary.
I am attempting to upload files to a folder on a remote server. However the folder is different for each user based on login. Is there anyway to do this using the code below. If not can someone tel me of a way to do it.
Dim DestinationPath DestinationPath = Server.mapPath("UploadFolder")
what I'm doing is executing a query based on login for a varible called "uploadFolder", so I want my destination path to be something like <% DestinationPath = Server.mapPath("rsRecord(uploadFolder)")%>
does any one here know of a good way to to determine whether or not a given path is a directory (e.g., "c:mydir") or a file (e.g., "c:mydir myfile.txt")?
i started attacking this problem by using filesystemobject to check whether or not a directory existed for the path. if so, it was a directory path. if not, i checked to see if a file existed for it. if so, it was a file path. Code:
I usually use SQL Server, but have occasionally had to use Access. This is such an occasion. My research, mainly at aspfaq.com, has been that you need to put the file path in your connection string, like this (watch out for the wrap):
I have one COM (.dll) for uploading files to server. Its working fine on server A but same code and file not working on server B giving error Path/File access error .
I have a simple asp form which writes to a csv. The code it's based on (from "ASP for Dummies") is:
Set peoplefile - _ filesys.OpenTextFile( _ "c:inetpubwwwrootgbgbpeople.txt",1)
The form is going live soon, and I'd like just a dash of due diligence in terms of security. I tried using a relative link to the gbpeople.txt file which didn't work. Is there a better way around this without reinventing?
I am trying to create a log of certain events on the website by writing them to a text file. The logging code is in an "included" file that is inserted into the pages that need to be monitored. Currently, the target text file is just specified in the FSO MapPath as "thelog.txt", so it writes the log to a text file within the same folder as the web page.
The problem is that I don't want to grant browsers Write access to my pages folder, so I need to have a separate directory to hold the log text file that browsers can have Write access to. The web site is hosted on a shared server that I do not have direct access to. In the past, occasionally an error has popped up that states the exact location, but I can not get that to repeat. I know it is something like "D:customersmyuseridwww"
How can I find out the actual location on the server so I can use an absolute path to write all the logs to one file in one location?
I have an upload script but i would like to show the person who uploaded the file the path to the file he uploaded. Ex: http://site.com/images/uploadedfile.jpg.
ive got a bit of code to check if a file exists and it works if I use the full path ie "C:Inetpubwwwrootfile.txt" can someone advise me how to get it so I can use the relative path ie "file.txt" where the file and the code are in the same directory? Code:
I have a Physical path that I need to convert on the FLY I thought using Replace would be a good idea, and it almost works
function MapURL(path)
dim url2 'Convert a physical file path to a URL for hypertext links. url2 = (path) MapURL = Replace(url2, "", "/") MapURL = Replace (url2,"E:","http://myscs/docLibraryDocs") MapURL = Replace (url2, "IntranetLibrary", "")
end function %>
- Is it possible to have multiple replace on the same variable ? - am I doing it the right way ? or is it possible to concatenate those replace in one go ?
Is there a limit on how many Replace one can use for one variable ?
The problem I have is that it takes the first two Replace in consideration but not the third one. If I remove or comment the second one then the First and the third one works fine. For some reason, it doesn't like to have the three in the same time.
by the way, the link I try to change is as follow: Code:
I need to load the file path of a file on a web server into a form text box. I tried using a normal form box using type=file but that just seems to return the file path from the local machine.
Ideally I'd like it if someone can get this to work with a file on a web server without using asp. If not then I suppose I'd have to use the FileSystemObject method. I can see how you can get a list of files from a remote server using FileSystemObject.
The problem I need help with is selecting a file path from the list of files into a text form box. The path of which I am then going to write to a database field.
I have a virtual path setup in order to give my web server access to a file on my app server. I am using the file system object to check for the existance of the file and if it exists, it has to validate the file date.
The problem is I can't seem to find the file. I can successfully check for the existance of a file on the web server, but once I enter the virtual path it can't find anything. All three of these calls return false...
I'm working on a project where I'm suppose to upload a image to a server. The uploading works fine but when I want to change the image I uploaded to another image I can't get the filepath of the old image to show in my "filefiled"....is it possible to set a "value" where I can retrieve a filepath in a form if the input type is "file"?
I'm having a problem with the fact that I want to allow image files to be uploaded to a remote web server, as the hosting package the web site is on is IIS6 and has a default file upload size limit of 200kb. As it's a shared hosting package, the default limit cannot be changed for me unfortunately.
Anyway - i need to check the size of the file being uploaded, so i can notify the user and prevent them getting the default Microsoft error message page. The problem is that I can't implement a server side size check which works, using either Request.TotalBytes or load.getFileSize (with "load" being an object of my loader class). It seems that I can't carry out any of these operations when the file size is too large.
I would like to add a facility to my web page which allows users to upload basic files (word, excel, text, gif, jpg etc) to the server.
I know there's a facility to do this using HMTL forms, but I don't know how to handle the file on the server side.
What I think I need is an ASP file running some code to manipulate the filesystemobject, allowing me to receive the file and store it in the filesystem on the server. It would be nice to access some of the file properties too (name, type etc).
I've seen a few custom components online which allow you to do this, but I can't depend on installing them. I need to be able to script it myself.
This is probably a very simple thing to do, but I'm a PHP developer, not an ASP developer, and don't really have the time to learn ASP (though will shortly be starting in on ASP.NET).
What I need to do is come up with a Classic ASP script that will open up a .css file and pass that straight through to the user (with appropriate headers). This would be unbelievably trivial with PHP, and I'm sure it's not much more complex in ASP, I just don't know how. Code:
Lets say I have a list of all of Jimi Hendrix's live shows. I can view the entire list at shows.asp. Now, what do I do if I just want to see shows for, lets say 1971?
I want hyperlinks on my page for each year and when I click the year, it generates the list of shows from that year. I dont want to make an ASP file for every year. How do I do this? Do I use a METHOD=GET and then do something like "shows.asp?year=1971"?
Basically, I'm trying to make a web-enabled database for band. So this is gonna get complicated. Like once I get a certain year, I may also want to view by states and so on.
I'm working on a asp-application where I shall upload a xml-file from the user, and then process til file (xml) for insert into a database. I'm currently using a "INPUT-field of TYPE=file" to browse for file, and a extra submit button to perform the actual transfer and start file-processing.
Is it possible to show the user one ebutton "IMPORT" without any text-field associated with it, which browses for the file and directly startes the upload to server and triggers file-processing. The actual processing of the file must be done on the server-side (inserts to db etc.).