Quantcast
velospace is about bikes and the people who ride them buy / sell photos random












    • CommentAuthorFTMG
    • CommentTimeApr 11th 2009
     
    why does this happen? its so fustrating to take the time to resize my pics, post them...for another persons bike parts to show up. what gives? i went through the process 3 times to make sure i wasnt making a mistake and the same stuff happens. i see this happens a lot to other people as well. WHY?!?!?!?!
  1.  
    Change the title of your picture to something more unique. If it's just titled "bike", it adds someone else's picture with that title.
  2.  
    yeah i'm having the same problem...and changing the title isn't doing much.

    so i guess people will think i'm riding a bmx with camo rims instead of a straight up track bike...
    • CommentAuthorOtto Rax
    • CommentTimeApr 11th 2009
     
    name it something very unique and re-upload. pedalstrikeimg111111.jpg or whatever
    • CommentAuthoreaglerock
    • CommentTimeApr 11th 2009
     
    It's a result of the architecture on the Velospace server, which is basically just a folder on a hard drive with a lot of stuff in it. Basically, all the photos from all the listed bikes are in one big folder:

    http://velospace.org/files/(your pictures here)

    As with any computer, you can't have two things in the same location with the same name - either the second one's name will be changed without your control (Windows), or the one being copied in will overwrite the one that's already there (Mac, Linux, Un*x). If you've never noticed this phenomenon before, try it on your own computer; create a folder named "File Renaming Experiment", create one text document named "file.txt", put it in the "File Renaming Experiment" folder, then create a second text file with different text in it. Name that file "file.txt" as well, then drop it into the "File Renaming Experiment" folder and see what happens.

    Essentially, that's what happens on the server every time a file with a duplicate name gets posted into the one big folder where all the photos live. As terrible_one and Otto point out, generic names will get you in trouble every time.

    Personally, in a situation like this, I like to identify my photos very precisely, so there's no mistaking what it is. Let's compare an example of one of my photos to one from someone else's listing:

    http://velospace.org/files/t_PEA_Bianchi_Chorusdrivetrain.jpg

    Here, I've used my initials, then the manufacturer of my frame, then a brief description of the specific photo. I could beef this up by including a date, either the date I took the photo, or the date I uploaded the photo. That would allow me to keep track of when I swapped photos out.

    PS: the t_ appears to be added to the file name as part of the upload process.

    Now, let's look at another example:

    http://velospace.org/files/t_IMG_7132.JPG

    Here we can see a photo that basically went straight from a digital camera to the Velospace server without anyone ever changing the name.

    Most cameras automatically impose names like "IMG_xxxx.JPG"; my own camera names photos "DSCxxxx.JPG". When you attach your digital camera to your computer to import the photos, the photos come over with whatever name the camera gave them. Since most cameras restart the number sequence every time you reformat the storage card, you tend to produce a lot of photos with names like IMG_0001.JPG or IMG_1001.JPG. But most of the camera import apps organize photos into separate folders for each import, or for each photo day (the date/time when the photo was taken is stored in the photo itself); so you're not likely to see photos disappearing from your photo library just because you imported new ones - otherwise, people would have cleaned up their acts years ago. But you often see it happen when people try to copy multiple photos out of their libraries into new folders, such as when they burn CDs.

    But Velospace's server doesn't even separate uploads, so the "dude, where's my photo?" thing is a regular problem. My guess is that when Greg originally set up the site, he used just one photo folder because he didn't know how many people would come here; it's a scaling issue. There are architecture changes that could be made, such as giving each user a unique photo upload folder, which would be automatically created when the user account is created. In that case, my photos would be in "http://velospace.org/files/eaglerock/" or http://velospace.org/eaglerock/files/", instead of loose in a folder with everyone else's photos. But that could be quite labor-intensive to sort out at this point; we can't demand that Greg re-engineer the system just because we can't trouble ourselves to rename our photos sensibly. And even if he did, it doesn't eliminate the generic names issue: If I upload two photos with the same name, and upload them to my own photo folder, one of them's going to disappear.

    General advice from this Internet know-it-all: If you look at your photo name without looking at the photo, and you can't give a good description of the content of the photo just from looking at the name, then you need to rename your photo. And don't skimp on detail.
    • CommentAuthorOtto Rax
    • CommentTimeApr 11th 2009
     
    name your photo "bike", and all the sudden, you're one of 2000 people who eveidently ride a red levant.
    • CommentAuthorOtto Rax
    • CommentTimeApr 11th 2009
     
    this should be a sticky
    • CommentAuthorgridplan
    • CommentTimeApr 12th 2009
     
    Each bike should have its own set of images and not depend on what the file was named when it was uploaded. It was confusing to me and continues to be for others. I'm making some assumptions here, but here's an approach to the problem:

    1) Create a database table to hold info on the images associated with a bike. Include columns for image ID, bike ID, original filename, path to image file on velospace.
    * Original filename would show up as it does now on edit page.
    * Like now, there would be up to 5 image records associated with each bike record.

    2) Modify code that handles uploads. Anytime a file is uploaded for a bike...

    * Create a transaction so code can roll back in case of I/O error, disk full, etc.
    * Store contents of file on disk at velospace.org, preferably in a user-specific directory. Give the file a unique name (very important).

    If user is ADDING an image to a bike:
    * Add a record to the images table. Record will have image ID (unique), bike ID, name of file being uploaded, and path to the file we created in the previous step.

    If user is REPLACING a bike's image:
    * Amend that image record so the path points to the uniquely-named file we created above. Amend original filename column, too.
    * Remove the old image file from disk.

    3) Write a script to convert existing bikes to new format
    * Take site offline while conversion script runs
    * Run a script that iterates through the bikes.
    * For each bike record...
    - For each image associated with the current bike...
    * Follow step 2) above for adding an image to a bike
    * NOTE: Bikes that point to the same image would point to their own copy of that image. Image would change when re-uploaded (as it does now) but without user having to guess at uniqueness of file he's uploading.

    * Pros:
    - Unambiguous. Whenever a file is uploaded to the site, it wouldn't conflict with what's already there.
    - No guesswork. Users wouldn't need to worry about the uniqueness of the file name they're uploading. Code on server side would assign file a unique name on the server while noting original name for purposes of the edit screen.

    * Cons:
    - Would require increased disk space. Each bike would have its own set of pictures (as one would expect).
    - Images that are currently wrong would remain wrong until user edited bike and replaced the image.
  3.  
    thanks guys, fixed, and now i'm no longer riding a mystery bmx!

    yay!
  4.  
    Hey, Greg, is there a way to mitigate this by giving every user their own subdirectory, since all user IDs are unique? Or to append the user ID to the file name to make them unique? Cuz this cuts both ways — one of my bikes has been slowly losing its images since I uploaded it, probably as others have put up images with the same name.
    • CommentAuthoradriano
    • CommentTimeApr 12th 2009
     
    does the older picture with a given name always show up?
    • CommentAuthorgreg
    • CommentTimeApr 12th 2009
     
    I have spent a lot of time and effort trying to fix the photo problem. I've attempted to bring in some people who are experts in Drupal to fix the problem. To date, nothing has worked, but I am continuing to try to get it fixed. If the solutions were as easy as those set out in this thread I would have fixed the problem long ago, but alas, as is often the case with technology, nothing is easy when the ghost in the machine is causing all the problems.

    If you have a solid background in Drupal, PHP, Linux, and system administration, send me a note and I will put you to work. I'll pay you for your time. I've talked with a dozen people over the past 2 years but no one has been able to fix the problem. The good news is that the vast majority of the 10,000+ bikes of velospace have proper photos. Its a bummer when they don't, but there are plenty of bikes to look at.

    Thanks for all your suggestions.
    • CommentAuthorJrader80
    • CommentTimeApr 14th 2009
     
    it should be fairly easy for add a the time and date of upload to the name of the file, so bike1.jpg becomes bike1121804142009.jpg. I did perl about 10 years ago but I remember none of it. Sorry I can't be more helpful.
    • CommentAuthorsfbee
    • CommentTimeApr 14th 2009 edited
     
    It would probably be best to partition the user uploads into their own respective directories, of which are also partitioned 2 sub-directories deep based on the first two characters of their user names:

    For example:

    My uploads would go into ~/users/s/f/sfbee/

    The reasoning behind this is with the assumption that you're on a typical linux colo formatted with ext3, which has a limit of 32000 files or 31998 sub-directories per directory. Partitioning with the aforementioned scheme would give you the ability accommodate 35 * (321998 ^ 2) users (assuming you're only permitting alpha-numeric characters as the leading character in a user name), which should be more than sufficient (unless you plan on having more than 11 million users any time soon)

    I deal pretty much strictly with Perl, but could probably whip something together for you after a bit of tinkering
  5.  
    The problem here is not the scale of the name space, but the fact that people use words, not random strings of letters.

    I've got a friend who works with Drupal all the time. I'll get him in touch with you.
    • CommentAuthormastronaut
    • CommentTimeMay 21st 2009
     
    Name the bike (example SchwinnTraveler08734a) if there's an issue with that one or you make changes to the photo re-name it SchwinnTraveler08734a1.
    that should pretty much cover your ass
  6.  
    I came into the forums to get an answer to this very question. Now I'm disappointed that any of my pictures showed up since I used such unoriginal file names.
    • CommentAuthorbugmcw
    • CommentTimeSep 29th 2009
     
    this should be a sticky... i searched for it so im sure others are looking for it too, hopefully this will stop them posting a new thread about it
  7.  
    file names
    • CommentAuthorbugmcw
    • CommentTimeSep 29th 2009
     
    Posted By: williamrogersfile names


    haha ummm what? its answered already... or did you just feel like reiterating?
    • CommentAuthorLyKqiD
    • CommentTimeSep 29th 2009
     
    it doesnt need to be sticky'd because greg has already outlined this in the 'welcome to velospace' thread. Though no one thinks hard enough to go and read it.
    • CommentAuthorbugmcw
    • CommentTimeSep 29th 2009
     
    haha fine i take it back, just trying to help.... geeez
    • CommentAuthorLyKqiD
    • CommentTimeSep 29th 2009
     
    bugm, I didnt mean that in a harsh way, just trying to perhaps explain the logic.
    • CommentAuthordanzap209
    • CommentTimeSep 29th 2009
     
    use your phone# as your title. like.... 925.867.9996pic1
    • CommentAuthorbugmcw
    • CommentTimeSep 29th 2009
     
    haha i know i was just messinnn, sorry sarcasm is tough on forums
    • CommentAuthorLyKqiD
    • CommentTimeSep 30th 2009
     
    Posted By: danzap209use your phone# as your title. like.... 925.867.9996pic1

    You didnt just put you real phone number on the interweb? Better hope you dont have any enemies, or else you might be getting a call like...
    "This is the second notice that the factory warranty on your vehicle is expiring..."
 


about, FAQ & policies | contact | blog | status | resources | site map | graphic design
© 2005-2009 velospace. All Rights Reserved.