Topic: Operation with ways to photos without php and node.js on a hosting
All greetings. There will be a lot of text for the situation description
A question Essence, for those who does not want to read all text:
How to generate ways to present at a folder on the server apach files with unknown in advance names, without usage PHP, at once to use these ways for generation of tags img?
I have very much a brief experience in a web development on client side with usage html, css and other things which are launched on apache.
(Normally I take the server on which it is installed tomkat/glassfish and any DB, I saw application on Java with usage different or on bare servlets and especially was not soared concerning questions of simple display of pictures with usage of ways to them which hranjatsja/are generated (we we admit through any kind ajax request) and are edited in a DB.)
But here there is at me a personal site which I want to rewrite on React JS and there there will be photos.
I would like them to add simply throwing in a folder on ftp.
But it is necessary for display of pictures already! To have ways to files. After all so?
Not a problem if files have names 1,2,3...999.jpg here it is possible javasript' to generate ways and accordingly tags img with these ways.
But what, if names of files are unknown and will be added through ftp?
PHP I do not know (well almost) and not especially would like it to study, simply there is no time.
The hosting the most normal for $2 a month, there is only php.
Invented the angular decision on the basis of that that to me more close:
1. Locally in the project in IDEA (not an essence) it is used Node.js.
2. A script we take a way to a folder, we sort out inside files/folders if it is a folder for this folder as we launch a script.
The script as generates from the received names of files a file with contained in a format json and puts it in a folder which then goes in build together with present folders from a photo.
3. Page React' takes a file with json and through some functions reads from a file objects, takes from objects names of files and further it is already possible to generate ways and to display in any component the photo necessary to us.
Minus of this method that it is necessary to support locally contents of folders with photos (what not so badly - ) and to add new, is necessary:
And. To add it it is local in a folder with .
. To launch a script for generation of a file with json
Century to Flood photos/ju and a new file with json on ftp.