Answer the question
In order to leave comments, you need to log in
Are there any solutions (in php) to automate the upload of a directory to the site (including image files)?
The client wants to automate the upload of the catalog to the site. We decided to act through CSV. Those. he fills the table with the necessary data in Excel, saves it in CSV and uploads it to the site, and there php already parses the whole thing and uploads it to the directory. It seems like everything is simple. But what about product image files? For example, a product has a main photo and several additional ones. Plus, there are still images that must be inserted directly into the text, i.e. in the description (in fact, this is an img tag with a written path to the file). Are there any ready-made solutions on how to organize it all? I now see only one way - first upload all the pictures to the server, and manually write the paths to them in the csv file, but something seems to be that this is not the best solution. Maybe someone will advise.
Answer the question
In order to leave comments, you need to log in
1) Create a zip archive with a csv file and pictures. In csv specify the path to the pictures.
2) It also depends on the format in which the client has it. How does he store in the description of the picture in Excel? Or there is no original format at all, then instead of hammering in Excel, it’s easier to score everything right through the admin panel on the site.
3) Parse the word, but it's hard, the second option is the most optimal, but again, it all depends on the form in which this information is from the client.
You can directly parse the Excel file. There are classes for this.
the main question in what form are the pictures now?
No. There is no ready-made solution right for your needs.
You will need a programmer to solve this problem and a more complex principle for generating CSV files, where you will have to specify the names of the image files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question