Folder question before I get my hands dirty...

Image previewer add-on.
Post Reply
tomkirk23
Posts: 9
Joined: Tue Oct 20, 2009 8:57 pm

Folder question before I get my hands dirty...

Post by tomkirk23 »

Hi -

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

My questions:
- 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?

Thanks,

Tom K.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Folder question before I get my hands dirty...

Post by support »

Hi,

See answers below:
- Does each upload session get stored within a separate server folder (like a unique timestamped session folder - for instance)?
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.
How do I identify the files uploaded by a certain person? (perhaps by name - do I prompt them for their name?)
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/
How do I ensure that the contents of an upload from person A are separated from the contents of an upload for person B?
One server-side folder per user.
- 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?
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.
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.
You plan FTP or HTTP upload ? For HTTP I think you miss the server-side script required to handle upload request.
http://www.jfileupload.com/products/tools/index.html
Can JImageUpload do what I want?
Yes, I think so. HTTP upload with JFileUpload + JImageUpload + PHP script on server-side.

Does it help ?

tomkirk23
Posts: 9
Joined: Tue Oct 20, 2009 8:57 pm

Re: Folder question before I get my hands dirty...

Post by tomkirk23 »

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?

Thanks,

Tom K.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Folder question before I get my hands dirty...

Post by support »

I would see:
Page 1:
HTML form with end-user identification

Page2:
Applet with account parameter filled in from end-user identification (with PHP).
The applet will upload into:
/home/users/userid

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.

Post Reply