Renaming After Upload
ok i have the uploads working but when i try to rename with 'MoveFile' nothing seems to happen. this is my code:
View Repliesok i have the uploads working but when i try to rename with 'MoveFile' nothing seems to happen. this is my code:
View RepliesI'm basically doing the same thing except I have to upload the images from one web app and then load them from another so I've set up a virtual directory in IIS that points to the physical location where the files are.
Here is the relevant codecheck to see if a file existsMake sure the file type is a jpegMake sure the file is an acceptable sizeGenerate a filename based on the current date and timeSave the file to a local directory that a virtual directory points to on the web serverTry to display the image in an asp:image control by loading it from the webserver
Code:....
i am trying to get around having to use querystrings, by having all my category id's made into folders, and all my products made into asp pages. so www.domain.com/2/product_1.asp
i know how to make the asp page and write it to a file but then how do i change the extension from .txt to .asp to make this still a dynamic page but with no need to request a product number.
I am trying to find out how to rename a file. What I want is to take the orginal filename and put todays date and time in.
So something.txt would become 2008/01/17/0918something.txt
I have the following but it states "Path not found"
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim fso, newName
set fso = CreateObject("Scripting.FileSystemObject")
newName = "c:"& now() & "something.txt"
fso.MoveFile "c:something.txt", newName
set fso = Nothing
%>
How can I rename a file with aspupload or FSO before upload?
I looked for in documentation of these products, but I could not find
anything yet
Is it possible to rename a file which a user uploads to the server?
I have a form which allows users to upload an image to a folder on the web
server. This works fine.
The form they submit takes their firstname, surname and the file.
However, I want the file to automatically be renamed to
firstname_surname.jpg (taking their firtname and surname from the form they
are submitting).
I'm looking for a renaming method for folder objects.I have an ASP (JScript) application that I'm creating that acts as a document library. Users can upload files, create folders, etc.
Most places I go to basically have: copy, delete, move, create textfile as the only methods for the folder object - NOTHING about renaming.
am trying to upload a file and at the time try to rename the file to autogenerated name.
View Replies View RelatedHeres what im trying to do, I have mssql databse full of about 15,000 item ID codes. For Example of the ID Code:
The first 2 sometimes 4 letters represents the distributor name, the numbers are the item number and BX for example means Box.
DJ3726
DJ3847BX
DJ3743CD
PD2374
PD2334
PD4334BX
And I have about 15,000 images from my distributrs that mostly match up to the actual ID number, but still a lot dont match up because of a small extra letter like BX Or somehting like that.
So what ive done was write a code that Splits out the Manufature code for example DJ from DJ3726BX, and also the same for the item ID 3726 from DJ3726BX, So when I put thos to together I get just the manufature name and ID code instead of the extra crap I dont need.
And now I take just the Manufacutre name and ID and looping through my database and all of the (images via File Scripting Object).
Then I check to see if the manufacure code and ID is in the item name. For Example
Check if DJ74637
IS In: DJ74637BX.GIF
Then if it finds a match it gos and renames the gif for me. And it loops through untill its done.
My problem is that it just doesnt work, no errors no anything it just doesnt pick up any images when I can visualy go through my self and find some matchs.
Heres my code that I came up with so far ....
i want to give a option to client that they can upload there logo/images. how i can upload the images and when some upload the images i want to rename the images as the user name of the client or some autonumber. how i can rename the images.
View Replies View Relatedmy page uses a javascript function which alerts users like this:
alert("An alert message");
how do I rename the message box in which this appears?
i have a field that i'm extracting from a database, but when i take it out i want to rename it depending on what it is called. for example: Code:
View Replies View RelatedI'm developing a website for work that exports some reports to excel.
I am using the...
Response.AddHeader "Content-Disposition","attachment;filename=report.xls"
Response.ContentType = "application/vnd.ms-excel"
....strategy to do this. It works wonderfully except I cannot figure
out how to do two things:
1) specify a name for the worksheet that's exported (it names the
worksheet "blah.asp?q=123" when the user wants to see "Monthy Quotas"
2) generate multiple worksheets. The exported spreadsheet should have
about 6 tabs on the bottom that all contain different information in
the same report.
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 keep getting the following error message when attempting to run the below script.
Persits.Upload.1 (0x800A001)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
line 42.
line 42 is "File.ToDatabase Connect, SQL"
Code:
I need some help with aspupload and a database. I have used the same script before and it worked fine, but now it wont upload. Code:
View Replies View RelatedI have been using pure asp upload for uploading pictures and files fo rome time now.
I have a question about it thou - Is there any chance that the pure asp upload can upload a file to a directory and then copy it to a backup directory?
If anyone ever come accross this issue please let me know how u resolve it.
I use a windows application that can upload data to a http server.
I don't know exactly how the application uploads the data, but looking at the data communication I can see that the application tries to post data of type "multipart/form-data".
How can I make an asp script on my webserver that receives this data and store in on the hard drive?
Is there any way to upload an image from a URL in ASP? I'm sure it's possible, but I can't find anything on it.
View Replies View RelatedHow to Upload files in Asp with small source codes.
View Replies View RelatedI need to upload files from a web page to the server using ASP.
I've tried the following:
Can't use ASPUpload (persits) because it costs money
Can't use ASPFree because it requires VBScript 5.0
Tried ASPSmart and it says you need to save dlls to the NT Server. I dont think I can do this with my host.
Tried Dundas, but I'm completely lost with how to use it. It only seemed to download help files.
Can anybody recommend something simple to use? I don't need anything flash. Just the ability to upload a single file.
on my site www.mutedesigns.co.uk/ws
if you log in
user: test
pass: test
and add a new picture, browse for picture then click upload, it asks you to copy and paste the name you just uploaded into the form field after UPLOADS/
how do i get to insert this filename into the database?
We have a page that handles uploads, but it's hitting the 90 sec default timeout. If place this server.ScriptTimeout = 150 at the top of the page, will it set the time out for just the one asp page, or reset the value at the server level, and thus adjust it for everything.
View Replies View Relatedi manage to store the picture pathname into database... c:folders
lablabla....with my primary key A
but how do i retrieve it back with my primary key ?? it is simple to
do in php and .net
I want to offer the ablity for a user to upload an image to a specified directory on the server whilst inserting a record into a mysql database.
For example a user wants to add a new employee. They enter the revelant information into the form and they upload an image connected to that new employee about to be inserted.
Is this possible? how would you upload the image and link the image to the recordset in the database?
is there a way i can use GET method to pass the upload file value. I mean somethin like: have the file field on one page where you get to choose the file and then there is a submit button which calls the the actual upload script which has a button named Upload.
Is that posible to do? cuz all the upload scripts i've seen so far has the file field in the same file as the code that uploads.
Been using the same upload script for over 2 years. Recently, 2 images have given the error below. One was a pdf and one was a bmp. Other (and larger file size) pdf's and bmp's have uploaded with no problem. What could be different about these two images that would cause this error?
Persits.MailSender.4 error '800a0007'
The system cannot find the file specified.
Sometimes I have a problem in upload file (not allways). My cod is:
Public Default Sub Upload()
Dim biData, sInputName
Dim nPosBegin, nPosEnd, nPos, vDataBounds, nDataBoundPos
Dim nPosFile, nPosBound
biData = Request.BinaryRead(Request.TotalBytes)
nPosBegin = 1
nPosEnd = InstrB(nPosBegin, biData, CByteString(Chr(13)))
The error that appears is in line "biData = Request.BinaryRead(Request.TotalBytes)"
I want to include a text element to the asp upload file. When I read the documentation, it says that I have include Form collection to process the text element and include as:
strusername = upload.form("username")
I am not sure where this username should be defined and how do I process this text element along with the filename?
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.).
i'm trying to create just a simple upload - fill in a form with the article
title, and description - and select a file - i need to upload that file to
the webserver, and then rename that file to the <% =Sartid %>.pdf
any ideas where to get something this simple from? never done anything like
this before - i'm guessing the FSO will be used?
Is it possible to upload files using <INPUT type="file"> tag from IE on PDA .
View Replies View Relatedwhen i load the page nothing happens, it just refreshes to a blank page. does this page need to be named something special? does it need to be on the same server it's uploading to? Code:
View Replies View Related