473,732 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Audio File uploads to database tables - what "type" do I define it as?

2 New Member
Hey there. I will not pretend to know more than I do...I'm just getting my feet wet with Dreamweaver and MySql databases. What I'm trying to do is create a form that will allow members to submit an audio file (mp3 or .wav) from a website. The form will insert the record into the database IF I can get it configured correctly. Here's the problem- I don't know what type to list the field as in order to get it to accept a file upload. Is this even possible?

I have the tables set up in the database and I have the insert record form page written in php (thanks to Dreamweaver). Can anyone offer any advice on how I can allow submission of audio files?

If I'm not being specific enough, please let me know and I'll try to better explain.

Thanks!
Cowgurl Art
Jun 1 '07 #1
5 3924
pbmods
5,821 Recognized Expert Expert
Heya, cowgurl art. Welcome to TSDN!

You have two options:
Jun 3 '07 #2
cowgurl art
2 New Member
Heya, cowgurl art. Welcome to TSDN!

You have two options:
Thank you for this reply. I did give up and decided to upload the file via ftp to the server and just input the url to the file in the insert record form on the website. So, I took the easy way out.

I thought it should be a BLOB but I didn't know how to make the "insert record form" accept the blob. I'll think on this now that you've given me some help and maybe I can work it out. Thanks!
Jun 4 '07 #3
cat1205123
1 New Member
I'm doing a similar project myself.

Between the two (upload or store in a DB), why would I want to choose one over the other?
e.g. Does one take up more physical space? Does one have less overhead?
Jun 15 '07 #4
Atli
5,058 Recognized Expert Expert
I'm doing a similar project myself.

Between the two (upload or store in a DB), why would I want to choose one over the other?
e.g. Does one take up more physical space? Does one have less overhead?
It would depend on what you want to do with your files.

It is probbly simpler to save files onto the file system. That way also makes retreiving them much simpler.
On the other hand, if your files contain sensetive data, they would be much more secure inside the DB, and you would have much more control over how they are handled.

You will have to jump through some hoops to insert and retreive them from the database, which many people will say can cause some extra overhead, but I think that's more of a myth than a fact. Most extra overhead is caused by poorly designed code.

Anyways, If you want people to have easy access to the files, I would upload them the old fashion way. If you want them keep them away from people, I would put them on the Database.

But thats just me.
Jun 15 '07 #5
pbmods
5,821 Recognized Expert Expert
Anyways, If you want people to have easy access to the files, I would upload them the old fashion way. If you want them keep them away from people, I would put them on the Database.
Even then, all you'd have to do is store the files outside your webserver's document root and use include or fread to access them.

The major difference in my opinion is that a CMS that stores files in the database is a pain in the butt to maintain, especially when somebody else wrote it (can you tell what I'm working on right now? :P).
Jun 15 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
7540
by: Jarrod | last post by:
Just reading from a previous thread about multiple uploads. I wanted to use script to create multiple input file elements that put the path in as a default (or something like that) based on ASP code. My problem was that the input file value property is readonly and there is no default value. The thing is you can cut and paste a path manually (ctrl-c,v) but I couldn't work out how to do it from code. I thought that anything that you...
0
2044
by: mc kim via .NET 247 | last post by:
What I am trying to is automatic bidding process in Ebay site... WebClient class can uploads form data easily. I have collected ebay url & form data to uploads.. Most of process is quite easy and simple. But ebay webserver send me your password is not valid... But the password is clearly correct.. you can type it at the result page and submit. Then you can see a message - bidding has ended and you are logged in. <- This is the message...
2
44025
by: @lias | last post by:
Hi all I have a webpage where I want the user to input filenames. To make this easier, I use a file input type so that the user can select files rather than typing in the filename, using the HTML below. <input type="file" size="25" maxlength="256" id="filename" onchange="AddFile()" /> The problem I have is that the javascript function AddFile() is only run under
1
27902
by: Jesper Hermansen | last post by:
Hi! I'm making a system that will generate Winamp-playlists. To make it easy for the user to add a file to the list, I'm using <input type="file">. The problem with this is that I only get the filename, not the path, which is necessary in my situation. I cracked the problem in Firefox:
9
13426
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript"> However, I have found that I can use an alternate file extension, such as <script src="foo.HTML" type="text/javascript"> It works fine with my IE 6 and Mozilla. Will it work with other browsers?
1
1490
by: Jesper | last post by:
Hi, I've done some file type assignment to a program I've made such that e.g. when I double click on files of type .foo it will be openened in my program. However, I'm still missing two things: 1) When I right click on the .foo file (in MS Windows) and selects properties, my application is only shown with its icon under the 'opens with:' label and not with the name of the program like it is with e.g.
4
7859
by: Petr Vileta | last post by:
Sorry if my question was be here earlier, I'm new here ;-) I have html form where is the tag <input id="x" type="file" name="upload"> and another fields. After submit script on server take some validation on some fields and if te error is found the same form is generated with error reporting message. But the content of the "file" input is lost. I test it in IE6 and parameter value="???" not work here. I try to put string into input...
17
4558
by: haldie | last post by:
Well, a long time ago, some bright person got a hold of my computer and decided to "improve" it. Apparently they fouled up the default "open" option on the folder "file type," causing a folder to open in a new window -regardless- of what you have your options set to. So, before I go digging around in the registry, I want to hear what you all would suggest doing to fix it. All these new windows are driving me nutters. Oh, before I forget:...
3
3001
by: BiGYaN | last post by:
I am not an expert in C, but from all the C code I've seen in my last 4yrs of coding in C, I observe that programmers only use only "FILE *" type and never the actual "FILE" type. So my question is : <1what is the actual use of this structure; i.e. can it be used anywhere in general programming? It is of course a very important structure, but can we make use of it a standard C program? I am told that using internals of this structure is...
0
9447
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
9235
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
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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
4550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
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.