This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Best method (in html/websites) to upload images/videos to a server folder rather than a database?
Post Body

Hello guys. I've been programming in html/css for a bit now, but I'm fairly inexperienced with any other sorts of code. I've dabbled a bit, and I'm just now starting to try and get into JS/JQuery, PHP, etc.

I am basically, currently, working on a good method to where you could use a html form to select and upload an image or video, but instead of it uploading to a database, have the file get saved directly to the server, with the rest of the website files/folders.

I've spent some time trying to find solutions to this on the interwebs, with little to no avail--most of them just hand you some code, have you paste it, and it just flat out doesn't work. Or it does, but with no explanation on if there are any fields that should be changed, etc.

By the way, I am mostly doing this for my own educational purposes, as of right now none of this is really going to be used for anything publicly.

My main question is: What is a simple method to do this, and is PHP/JS required? Or are there <form> attributes I can use to do something like this?

The code I have is as follows:

`

<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="/js/jquery.min.js"></script> <!-- Reference to JQuery -->
</head>
<body>
<div class="img-upld">
<form>
<label for="Upload-Images-Test">Upload Images Test</label><br>
<input type="file" name="uploadImg" accept="/images/\*" action="/images/"><br>
<input type="submit" value="Submit"><br>
</form>
</div>
</body>
</html>`

Author
Account Strength
90%
Account Age
4 years
Verified Email
Yes
Verified Flair
No
Total Karma
881
Link Karma
190
Comment Karma
691
Profile updated: 3 days ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago