• Post Reply Bookmark Topic Watch Topic
  • New Topic

Uploading Multiple images with orielly package

 
DC Dalton
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im tinkering with the orielly package for uploading files from users to the server. Im not sure if this is a simple as it looks, I sure hope so! The one question I did have is a bout multiple uploads & enumerating thru them. What Im trying to do is allow a customer to upload up to 4 images to the server (Any number from 1 - 4 actually). (This is part of a personal ads program Im trying to build....also the last part in the app Im building). The orielly examples seem to refer to a single file being uploaded so Im not sure how I should enumerate thru the incoming files. Should I get the file name & upload one at a time or does someone have a snippet to handle all 4? I also want to rename these files as they are saved to the server in this manner: pic1 will be renamed to userName1.jpg (or whatever image type it is) etc. etc. What Im really worried about is someone overwriting another persons image (prior to the renaming) because of a naming conflict.........any & all help would be dearly appreciated. Im so far behind on this project now it's not funny!
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if you worry about users writing over previous files with same names, you can create a sub-directory for each user. You probably should have done it in the first place anyways. Another way is to rename each files submitted with a unique ID number. Shouldn't be hard if you have the uploading source code to tinker with.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!