Source language: Translate to:

Sequencing on Web

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Sequencing on Web

Postby Guest » Sun Jan 16, 2005 11:18 am

I am making a program that will require that every file that a customer uploads to mysite have a unique number.  That is either a folder or a file name.  There could be hundreds of uploads from thousands of different people (wishful thinking ;-) but lets say it does happen that way.

What is the best way to insure that a file is uploaded with a unique number and better yet, creates a unique folder to put their files in.  

I am using Alberto's FTP, so I can create folders etc.  

I would guess machine name + randome no. would work, but is there a better way, like having a sequential file on the site that would issue numbers etc.   I would like the numbers to be contol-able  like folder 123 and files 123-1, 123-2 etc.

Any thoughts or experience in this area?

Don
Guest
 

Postby Sam Cox » Sun Jan 16, 2005 11:37 am

Hi datadon,

A little more information will help:

1) Must the user's original filename be retrievable?
2) How long can filenames be?

Randomly generated names are okay but you'll have to handle the increasing likelihood of filename collisions (duplicates) as the file system fills up.

Creating a unique filename from the original name plus an encoded time/date stamp has the advantages of a) reducing the likelihood of filename collisions, b) being able to recover the user's filename from the time stamped name, and c) knowing when files were posted.

You might consider using Julian dates as a concise method of generating time/date stamps for your filenames.

Hope this helps,
-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Guest » Sun Jan 16, 2005 12:27 pm

The more I think about this the more I realize I will have to have a sequential system of issuing account numbers and I suppose their folder and files should be the same.  For easy corrilation etc.  

I haven't done it but I'm sure I can logon to the site and download a unique number to a file and then use that.  I think nb5 will have more stuff for internet connections etc.

I could probably have some script that would give them a unique number on a web page and then using a webobject they could just go there and see what is is and maybe add their login or whatever and I could then tie the two together.

Anyone done anything like this?

Thanks Sam

Don
Guest
 

Postby Guest » Sun Jan 16, 2005 2:42 pm

Don:
... will have to have a sequential system of issuing account numbers and I suppose their folder and files should be the same.
Good idea.
... I can logon to the site and download a unique number to a file and then use that. I think nb5 will have more stuff for internet connections etc.
Yes ... and Yes ... but if your NeoBook application is available without restriction, you might end up with hundreds (thousands) of folders ... if the application is purchased first, this might be the time to send the sequential customer number (perhaps embedded within the registration Key) that will be used in subsequent uploads.

Also, with a sequential folder structure, your security (access controls) at the server end will have to be that much more stringent ... so as not to make it easy for amateur hackers.

One measure would be to have the sequential numbers hidden inside a larger folder name e.g.

soAme_rBandom_leCDtterEs

... where the uppercase letters A, B, C, D & E represent numbers 1,2,3,4 & 5 ... all other letters are just obfuscating crap.
Guest
 

Postby Guest » Sun Jan 16, 2005 4:27 pm

The only thing I can think of is a server side option in conjunction with your app.

Now I guess you could create a server side app. with NB and run it on a windows server...

My experience is limited and limited to UNIX based servers.
Guest
 

Postby Guest » Sun Jan 16, 2005 7:46 pm

Good thoughts Gaev and Troy.

My app would be free to download and use so yes, could be many, many etc.  I hadn't thought about the hacker issue.  Those &$%#%$'s would have to be a consideration for sure.  

I think I will look for a web server script that will issue the number from a website after they login That way I can control it.  I'm not real savey in that areas so if anyone wants to suggest such a script I would be indebted.

Something simple like the usual info and username, password and then a page that would issue the number.  A number that would not be issued again.  I supposed it could then create the folder on the server.

If my idea takes off then I will have to go to a big time outfit and make things more secure etc, but hey that is just dreamin right now.  One step at a time.

Thanks all,

Don
Guest
 

Postby Guest » Mon Jan 17, 2005 7:25 am

Don:
... free to download and use so yes, could be many, many etc. ... look for a web server script that will issue the number from a website after they login
So, how would they be assigned a valid (unique ?) username/password ? If this is going to be a manual (email ?) process, then this would be the time to also send them the next sequential number ... may be even create a blank folder on the server.
... not real savey in that areas so if anyone wants to suggest such a script I would be indebted ... simple ... username, password ... issue the number ... would not be issued again ...  create the folder on the server.
This is the simple part.
... make things more secure etc
This is the challenge ... especially since every Hosting Provider has a different set-up ... and there could be so many back-door methods to bypass the server script and access the stored information directly ... or even read the script to figure out what controls you have ... obfuscation, encryption and even checks (via one way digests) might be warranted.
Guest
 

Postby Guest » Mon Jan 17, 2005 7:35 am

Gaev,

Yes,  you make some good points.  If I am going to get serious about this I think I will take it as far as I can on my end (application) and then have some pros help me with the website.  But first I will have to see if it has merit.  If you or anyone has suggestions on who can help me with the web end that would be good.  Please contact via the private mail messages.  

Don
Guest
 


Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 1 guest

cron