Image previewer add-on.
4 posts • Page 1 of 1
I am considering using JImageUpload and providing users with the ability to upload folders....
Situation: My user community is 50 people or so and will change on an ongoing basis. These people submit photos to me that I edit/organize and then post on a group website. I want to provide these people with the ability to upload folder structures containing photos and perhaps some other files. I want the folder structure and contents sent by a given person to be created on my server.
My questions are conceptual - I don't really need detailed answers, but I do want to know that JImageUpload can do what I want.
What I want:
- I want to be able to identify what person uploaded what set of files (file structure and contents)
- I want to be comfortable knowing that person A cannot overwrite files uploaded by person B
- Does each upload session get stored within a separate server folder (like a unique timestamped session folder - for instance)?
- How do I identify the files uploaded by a certain person? (perhaps by name - do I prompt them for their name?)
- How do I ensure that the contents of an upload from person A are separated from the contents of an upload for person B?
- What if person A and person B both upload a set of files within a folder named "photos" - does one upload over-write the other?
I just don't understand how the uploaded files will get stored on my server.. and whether I can config JImageUpload to give me what I want.
Can JImageUpload do what I want?
See answers below:
You can pass "account" parameter with userid and then all files with be uploaded to: "/home/users/userid". Another solution is to pass a sessionid in upload url and manage (in a server-side script) where files will be stored.
The applet allows passing any custom parameter. For HTTP upload you can manage authentication outside the applet with a login/password page. For instance, if you know that identifier is user123 before applet loading then you can pass: <PARAM NAME="userid" VALUE="user123">. You can also ask the applet to prefix all files to upload with user123/
One server-side folder per user.
No, if user1 uploads in /home/users/user1 and user2 into /home/users/user2. If both upload /home/users/ then it depends on "overwrite" parameter. Default is overwrite=true.
You plan FTP or HTTP upload ? For HTTP I think you miss the server-side script required to handle upload request.
Yes, I think so. HTTP upload with JFileUpload + JImageUpload + PHP script on server-side.
Does it help ?
Sounds very good....
Once question from a relative novice as it pertains to HTML, etc...... I do not want to use pre-established security accounts per user - nothing here needs to be all that secure.
However, I do want each uploader to identify him/herself as part of the upload process - perhaps by some sort of form. What is the best approach for gathering such information and passing it to JImageUpload? Can you point me to an example of this?
I would see:
HTML form with end-user identification
Applet with account parameter filled in from end-user identification (with PHP).
The applet will upload into:
Now the problem is with userid if you don't want pre-established account. What will be the userid?
It could be lastname_firstname but we have to be sure end-user fill in the form on page 1 correctly.
For each user you can also plan a subfolder with date so you know when he uploaded the images.