6 years ago
5
Topic

Hello there, 

I already have a solution with php,, but I would like to know if does exist a Seblod way solution.

I have a Seblod native  upload field that acts like an avatar (after a few javascript customisation).

My quastion is:

When the user changes the avatar a new image file is uploaded to the server, and the old one remains there without function. Does

exist a Seblod way to delete the old image when a new one is uploaded?

Thanks

Get a VIP membership
4229 Posts
Kadministrator
6 years ago
4
Level 1

You can enable delete checkbox, that removes image on users request, but I don't know how to make sure this is done automatically

6 years ago
3
Level 2

Thanks for your fast response Klas.

Will delete checkbox option  delete all images (thumbs and principal image)?

Is it possible to check delete and upload a new image at the same time?

Thanks

4229 Posts
Kadministrator
6 years ago
2
Level 3

Hi,

you best test this yourself.

548 Posts
joomleb
6 years ago
1
Level 4

I have the same problem with a pdf upload. I have to say that only a "replace" feature can run with users... Cannot be sure they select the "delete" checkbox and the file folder is going crazy, literally unreadable...

6 years ago
0
Level 5

Hello joomleb,

I have not tested, since I have another solution running, but you could test what Klas proposed (delete while upload), and if it works well you could use javascript to check delete checkbox when upload field changes.

Regards

Get a Book for SEBLOD