how do I upload a file into the database from dreamweaver? I have used a file field in the form but will this automatically upload no problems?
cheers!
GLT
how do I upload a file into the database from dreamweaver? I have used a file field in the form but will this automatically upload no problems?
cheers!
GLT
Quick, practical guidance tied to the posts from this thread (mentions: , , , ).
The core decision is whether to store the uploaded file itself in SQL Server or store the file on disk and keep its path/metadata in the database. For most web sites the simplest, fastest choice is: save files to a secured folder and store filename, path and metadata in SQL Server; if transactional/backup integration is required for large BLOBs, consider SQL Server FILESTREAM. (microsoft.com)
Minimal checklist to get an upload working in Classic ASP (Dreamweaver just generates the HTML form): the form must use POST and enctype="multipart/form-data" — otherwise the file input will not be sent as file data. Example form:
<form action="upload.asp" method="post" enctype="multipart/form-data">
<input type="file" name="uploadFile">
<input type="submit" value="Upload">
</form> Classic ASP does not expose a Request.Files collection like ASP.NET; server-side code must either use a third‑party upload component or a pure‑ASP multipart parser that reads Request.BinaryRead(Request.TotalBytes). Do not mix calls to Request.Form and BinaryRead — doing so commonly breaks the upload flow and can produce errors (including LBound on a non‑array when no files are parsed). (developer.mozilla.org)
Troubleshooting checklist for the specific errors seen here: 1) confirm the form encoding and method are exactly as above; 2) if using a component, ensure it is installed/registered and you call its API correctly; 3) check IIS/NTFS permissions — give the application pool identity write access to the upload folder (IIS APPPOOL\<pool> / ApplicationPoolIdentity), and avoid storing uploads inside webroot if possible; 4) check IIS request limits (maxAllowedContentLength / uploadReadAheadSize) for large files; 5) for “file already exists” either enable overwrite, change filename strategy (add GUID/timestamp) or adjust folder ACLs. (learn.microsoft.com)
Security reminders: always whitelist allowed extensions, enforce server‑side MIME/content checks, limit file sizes, rename uploaded files, store outside the public webroot or serve via an authorization-checked handler, and scan uploads with AV — follow OWASP file‑upload guidance. (cheatsheetseries.owasp.org)
If the LBound error persists after those checks, capture the full server error (line number) and the upload code path (component vs pure‑ASP) — the error usually means the uploader code expected an array of files but received nothing because the request was not parsed.
What database are you using?
Im using SQL Server and ASP
Are you wanting to upload the file to the database or upload the file to your server and store the filename in the db?
well i dont really know. I am student on placement and i have been asked for a way for the company to upload files of drawings etc of the equipment they sell so they can be accessed by customers. I have created a form in ASP with a file field which has a browse button on it. I am using this to test at the minute. I have put a small test file in the site file in the root folder and the browse button seems to be stored the URL. That would be fine if i could get it to work. I keep getting a L Bound error.
Ok dokey, if you can check out this tutorial , that will walk you through the process.
Good luck :o)
Thank you, however... in the tutorial it says that you will need a copy of the uploading component and gives a link to this but when i clicked on the link it said 'file not found'.
yip, that link worked!
THANK YOU!!!! :)
GLT
Hi, i having problem to execute the program.I want to upload a file into a database. I try to follow as in the tutorial you have mention above(SECTION 1: UPLOADING ANY FILE). I'm using Ms Access database and dreamweaver CS3. After i try to push the submit button, it come out a new page wrote "File already exist". i dont know what is the problem and what is the actual output sholud be. Can anyone help me...
It sounds like you don't have overwrite permissions.
Try extending the read/write permissions on the file/folder.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.