Been trying to figure this one out for months. I actually came across a similar question here but seems like what I want to do isn't really possible or hasn't been done?
Basically if you are using PHP and Html to upload an image to your database this is how you would start:
<?php
if (isset($_POST['submit'])) {
print_r($_FILES['my_little_image']); //gives the image name, size, type, temp location, etc
}
?>
<form method="post" enctype="multipart/form-data">
<input type="file" name="my_little_image">
<button type="submit" name="submit">Upload</button>
</form>
But I've got an image on my computer, not a remote source or url, which must land up in my online mysql database, by inserting something like "C:/my_folder/my_little_image.jpg"
in a .csv
file and then using PHP to somehow grab that image, do what the $_FILES['my_little_image']
and move_uploaded_file()
etc does, and see the path to the uploaded file in my database. So the result in my DB would be https://mydomain_example.com/uploads/my_little_image.jpg
Now excuse the elaborate question, I'm sure it could be said in lesser words but English is not my birth language. Is this possible?
Edit: My current users are using CSV files to upload images to my database using remote Urls they previously uploaded elsewhere (or on my website) - but I'm trying to figure out if there's a way to do this process without the use of remote urls. Basically, my users want a way of getting an image from the their own hard drive just by pasting the local url "C:/path/to/their/image" into the CSV file.