-2

I'm looking for the simplest way to upload a file and insert it into a table in a database using pur HTML and JAVASCRIPT.

There is no way to use JAVASCRPIT framworks or HTML5 since I'm trying to add a custom HTML part into a complex application.

I've found many examples using PHP, HTML5 and JAVASCRIPT but I'm really looking for pur simple JAVASCIPT and HTML script.

Ismail

Ismail Sen
  • 571
  • 2
  • 14
  • 27
  • 1
    Not sure what you are asking. You need to have *something* on the server that will handle your uploaded file. JAVASCRIPT and HTML5 are about what happens in the browser, not what the server does. You could have a Node JS server that runs Javascript on the server (rather than PHP), but I don't think that's what you mean by "Pure JAVASCRIPT / HTML". – Joel Lee Mar 11 '15 at 16:39
  • Javascript has always been able to talk to dbs: http://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript There are strong obvious reasons not to. You can insert the file into the database as a blob and retrieve it, etc... so can anybody else who does a view source. Your db would have to be publicly accessible, which is also a no no 99% of the time. – RandomUs1r Mar 11 '15 at 16:47

1 Answers1

1

you cant upload a file to a server with a client side language. You need at least some server side activity to handle the incoming file

DevDonkey
  • 4,835
  • 2
  • 27
  • 41