Thoughts about the Code Dump

The Forum Rules, general FAQ and questions or comments about the forum are posted here.
buildere
Super wx Problem Solver
Super wx Problem Solver
Posts: 358
Joined: Thu Oct 28, 2004 3:45 pm
Location: Costa Rica

Post by buildere »

Jorg wrote:Hi Guys,

Well I would say, whatever is easiest to implement. For me, even simple FTP will do but this means you will have to have a public FTP server and we all know what happens with that. People dump heavy s**t on there.

So, if you really want to protect files that are changed, we need something that is known to the original author only.

I am no web expert, so I don't know how this can be easily solved, but I am willing to add this to the site.

I also have a wxtest shadow forum for which I can give FTP access to the people who like to try. Ofcourse be careful and do not write stuff in my database because it shares the same database as the main forum.

Now that the Code Dump is receiving all kind of interesting snippets, we really must organize them ;-)

Regards,
- Jorgen
I would like to help with the php code. I'll try to write something this weekend and send it to you.
krysa
Experienced Solver
Experienced Solver
Posts: 71
Joined: Wed Feb 16, 2005 9:23 pm
Location: Lithuania

Post by krysa »

@Tyler:
Your solution is good, storing real file names in db table and generating unique names for actual files on server. But! Overwrite/Update mechanism wouldn't work, because most of the time people ends up uploading files like wxCoolCode.v0.1.zip, wxCodeCool.v0.2.zip, wxCC.v0.3.zip, wxCoCo.v0.4.zip and so on and we all now that it would be hard to write a script that would automaticaly detect such changes. That realy wouldn't help to save server space wouldn't it?

My sugestion would be that every user can upload some files in his own profile page (like "My Files" or something), and after he uploads he gets a link to the file, and he can easily remove the old versions of the same code on the same page... Or something like that.

Peaople likes to name different versions of the same thing differently (that is what i learned at my day job where we work on some software that allows to manage documents on-line (there's no public demo though)).
Platform: MSW (Windows XP Pro)
Compiler: msvc 13.10.3077 (Free Toolkit)
wxWidgets: v2.6.0
Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler »

Hey krysa,

I was actually suggesting the filename be cast to the unix timestamp. So for instance if they uploaded wxCool.zip, it would get changed to unixTimeStamp.zip, but now that I read your idea, I think it is better letting them retain their own file name.

There is no space issue caused by differing naming conventions with this scenario because any overwriting will be done to the old filename on record.
krysa wrote:My sugestion would be that every user can upload some files in his own profile page (like "My Files" or something), and after he uploads he gets a link to the file, and he can easily remove the old versions of the same code on the same page... Or something like that.
While it would be cool to have a collection of your uploads on your profile, I believe this will add a lot of complexity to the problem. If I am not mistaken, you would have to write the script to go from the messageboard server over to the database on the file server and pull back the list of the user's files (keeping a list of them on the message board server is not good for synchronization reasons). You may run in to some networking issues on this as well as most databases I'm sure only allow access from localhost. If this is not the case, I would be interested in knowing how else it could be done.
krysa
Experienced Solver
Experienced Solver
Posts: 71
Joined: Wed Feb 16, 2005 9:23 pm
Location: Lithuania

Post by krysa »

Tyler wrote:I was actually suggesting the filename be cast to the unix timestamp. So for instance if they uploaded wxCool.zip, it would get changed to unixTimeStamp.zip, but now that I read your idea, I think it is better letting them retain their own file name.
if they retain their own names - it will be easier for server maintainer to see what are those files, if they were just unixtimestamp.zip server maintainers would have to download the files to see what the file is. Unless, if we need unique naming we could use somthing like: timestamp-originalname.zip - that way it could work. ;)
Tyler wrote:While it would be cool to have a collection of your uploads on your profile, I believe this will add a lot of complexity to the problem.
Yes, i forgot that the files will (might) be placed on different server... Hm...
Platform: MSW (Windows XP Pro)
Compiler: msvc 13.10.3077 (Free Toolkit)
wxWidgets: v2.6.0
User avatar
Ryan Norton
wxWorld Domination!
wxWorld Domination!
Posts: 1319
Joined: Mon Aug 30, 2004 6:01 pm

Post by Ryan Norton »

Jorg wrote:Ryan, well I do agree with the core development. wxPython seems to stay low as activity so maybe it should, component development might still interest people. I always do check that one first when there is something new because new components and talking about them always interests me..
I don't know... it seems the c++ forum would be better for the component development -or better yet if you think it might be important maybe move it to the general forum thing next to the c++ forum.
Jorg wrote: I will have to give this thought. If one can go, maybe the "Chit Chat" forum for general talk about anything NOT NECESSARY related to wxWidgets can be added instead.
We should do this and remove the 2 (or 3) forums :).
Post Reply