samedi 24 juillet 2021

Image / video hosting which can provide original filename as link

i'm trying to embed image/video in my homepage :

<img src = "my_image" >

or

<video width="500px" height="500px" controls="controls"/> 
    <source src="my_video.mp4" type="video/mp4"> 
</video> 

This function works fine but the problem is about the image/video hosting. If i put my images on flickr, google drive or dropbox etc. They don't give me link to the file using the filename but they use their internal id :

https://docs.google.com/uc?id=1I_gBhobUvVWXC7BsWKu7ozKdsHzN3qSt7Y

If i create dynamic homepage using database, the image/video to be retrieved has to be in sequential format for example (i simply use google sheet as database for storing the image names ) :

image_001.png
image_002.png

or

video_001.mp4
video_002.mp4

My webpage will request the filename from database (google sheet) then it will generate dynamic link to the image.

The problem using ID to link to my images, if let say i have 800 images then i have to input manually all the ID into my database.

How is it possible ? Does anyone know any hosting that can provide this link-byname feature ? Or is there any tricks? something like getting the list of all image id and its corresponding image without requesting the ID one by one , so later if i have to use those IDs, i can input easily to my database/table.




Aucun commentaire:

Enregistrer un commentaire