I have a website that is highly dependent on my sql database. I store product information in a database and extract and format it with php. I would like to add images to the equation, but I don't know where to start. They have high resolution, so I donβt think that storing them in a real database is recommended, but I donβt want other administrators to spend hours entering product information and images. Like coasters, admins fill out forms, verify the information is correct, and the information is saved and then displayed on the website. When it comes to images, the best I could come up with was to add the name and location of the image to the product information and call it back using php, but I don't want my admins to take all day to name the photos and manually enter the name .Any ideas are greatly appreciated.
Personally, I would advise storing images in a reliable and scalable storage, such as Amazon S3 , which removes a lot of burden for you and allows you to place images through a cost-effective CDN at almost any scale (small or large).
, , . , md5 , S3 , , .
, , , , . , .
- -, , , CDN [, AWS S3], URL- URL- . , .
, , item_images , URL.
, , , URL- PHP , URL- src img.
<img alt="" src="<?php echo img_url[];?>" width="" class="">
:
, , enctype:
<FORM id="" method="post" action="" enctype="multipart/form-data">
$_POST $_GET, $_FILES.
. .exe, .php .
GETIMAGESIZE().
MOVE_UPLOADED_FILE , .
- .
$image_name=$item_category.$item_id.$extension
Source: https://habr.com/ru/post/1625367/More articles:Data Type of field from continuation model - javascriptWhy do you need to "replace" and not assign a new object to the same variable? - immutabilityA typical type of testing variable is jinja2The class in which std :: chrono :: duration is stored as a member? - c ++How to use Artemis with Camel Java DSL using camel-jms component? - apache-camelSqlDataReader returns a null value instead of zero for an int field - c #https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1625369/how-to-connect-a-git-repository-without-cloning-it-first&usg=ALkJrhjMLfty8iwjSAyqqHKLK9OUylveWAInsert form without SELECT - vbahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1625371/osrename-module-appears-to-delete-files-in-output-directory&usg=ALkJrhhI0W0b544VHHei_sAfW_LKAge-3wWhy did the jersey repack the guava? - guavaAll Articles