Hey everyone,
I have a bunch of questions regarding the CRUD aspect of handling a directory based image system on a site.
Can someone point me to a good resource on this?
for instance:
how do you auto-increment photo id's that your uploading?
what are the security risks?
anyway, any help is always appreciated:)
Andrew
Handling images...
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Handling images...
Do you want a filesystem only implementation, or are you going to use a database to track the images?
(#10850)
Re: Handling images...
yes, I will be tying it in with a DB...
AP
AP
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Handling images...
Then you can get the last insert id from the table (or sequence) to use as a unique number.
(#10850)
Re: Handling images...
Thanks! ya! that works I guess I didnt think about it that way.....
what are the other concerns in working with directory based content like this?
Ap
what are the other concerns in working with directory based content like this?
Ap
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Handling images...
Make sure you use move_uploaded_file() (or whatever it is called) to the filename you generate. File type checking has been covered in these forums, you can search and get good information. It may require multiple calls to identify a file. There is a class around here somewhere that identifies a number of types. And you will need to have some rollback code in case the move or insert does not work.
(#10850)