openplans/OTPSetup — Issue #3: Bad OTP setup GtfsFile IDs 
Author: kpwebb
Created: 2012-02-27 19:47:11+00:00
State: open

I just realized that we're using a timestamp to label the uploaded GtfsFiles. Unfortunately this is a risky strategy as there's no guarantee that the time stamps are unique. I just attempted to transload several dozen GTFS files from a server near the AWS server (i.e. very quick transfer times), as a result several of the files ended up with the same names and I assume overwrote the previous entity. See here:

http://deployer.opentripplanner.org/admin/client/instancerequest/12/

Can we change this so that the names use the id from the GtfsFile object? That's unique and there's no reason not to use it. Also, while we're at it we should go ahead and strip off the original name. It's not useful and may end up causing problems if someone uploads something with an invalid UNIX file name.

The names should read something like this:

uploads/12/123.zip (where 123 is the GtfsFile id)