This topic is locked

upload images to a folder based on a criteira?

5/16/2017 11:00:22 AM
PHPRunner General questions
Z
zwaenepoel author

I recently downloaded the latest version of phprunner

I'd like to know if it's possible to upload images based on a criteria, before i considered to buy it, to build some websites, for auto-stands.
For exemple i have the following images:
axxx101

axxx102

axxx103

bxxx101

bxxx102

cxxx101

cxxx102

dxxx101

dxxx102

dxxx103
I have a folder where all the images and thumbs, that I upload goes.
\pictures
But i need to use a criteria for the upload.

for example:
\pictures

\pictures\a

\pictures\a\thumb
\pictures

\pictures\b

\pictures\b\thumb
\pictures

\pictures\c

\pictures\c\thumb
Is this possible?

In the BEFORE UPLOAD EVENT?

How?
Thanks.

admin 5/17/2017

Check this article:

https://xlinesoft.com/phprunner/docs/rename_uploaded_file.htm
The idea is to rename/move files in events like BeforeAdd or BeforeEdit.

Z
zwaenepoel author 5/18/2017

Many, many thanks for your reply.
But i think that i didn't explanin correctly my needs.
I don't want to rename anything.

I just want to remove them from the default upload folder (\pictures) to a new one based on a criteria.
For files with filename starting with a B (Bxxxxxx.jpg), they should me moved to a subfolder: \pictures\b

For thumbnails of a file starting with a B (Bxxxxxx.jpg), they should me moved to a subfolder: \pictures\b\thumbs
The name of the file after, after it has been moved, it's not important.
Is this possible?

Any help?