Re: [twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2010-01-01 Thread Abraham Williams
Uploading the same file to Twitter twice in a row results in 2 unique
URLs. For example:

http://a3.twimg.com/profile_background_images/63273103/avatar-200.png
http://a3.twimg.com/profile_background_images/63273237/avatar-200.png

So after you upload the background image save the URL and either do
HEAD request to see if it is still active or compare it to the URL in
users/show.

Abraham

On 2009-12-31, Kyle Mulka  wrote:
> I've noticed that you keep the filename. That was kind of annoying for
>  other reasons:
>  
> http://groups.google.com/group/twitter-development-talk/browse_thread/thread/1f63694495c02ff/a713748c19c35895
>
>  If I just check the filename, I can't be sure that the file wasn't
>  changed by the user. It would be nice if the account/
>  update_profile_background_image function could guarantee that the
>  image URL returned was the actual image I uploaded. (with whatever
>  filtering you want to apply)
>
>
>  --
>  Kyle Mulka
>  Founder, Congo Labs
>  http://twilk.com
>
>
> On Dec 30, 8:03 pm, John Adams  wrote:
>  > On Dec 30, 2009, at 4:21 PM, Kyle Mulka wrote:
>  >
>  > > My application uploads a background image on a user's behalf. I want
>  > > to be able to figure out if they are still using the background image
>  > > at some future point in time.
>  >
>  > The filename might work as a test for this, instead of the
>  > computationally expensive MD5 on an image hack.
>  >
>  > We still retain the original file (basename) on images.
>  >
>  > -j
>  >
>  > ---
>  > John Adams (@netik)
>  > Twitter Operations
>
> > j...@twitter.comhttp://twitter.com/netik
>


-- 
Abraham Williams | #doit | http://hashtagdoit.com
Project | Intersect | http://intersect.labs.poseurtech.com
Hacker | http://abrah.am | http://twitter.com/abraham
This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2009-12-31 Thread Kyle Mulka
I've noticed that you keep the filename. That was kind of annoying for
other reasons:
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/1f63694495c02ff/a713748c19c35895

If I just check the filename, I can't be sure that the file wasn't
changed by the user. It would be nice if the account/
update_profile_background_image function could guarantee that the
image URL returned was the actual image I uploaded. (with whatever
filtering you want to apply)

--
Kyle Mulka
Founder, Congo Labs
http://twilk.com

On Dec 30, 8:03 pm, John Adams  wrote:
> On Dec 30, 2009, at 4:21 PM, Kyle Mulka wrote:
>
> > My application uploads a background image on a user's behalf. I want
> > to be able to figure out if they are still using the background image
> > at some future point in time.
>
> The filename might work as a test for this, instead of the  
> computationally expensive MD5 on an image hack.
>
> We still retain the original file (basename) on images.
>
> -j
>
> ---
> John Adams (@netik)
> Twitter Operations
> j...@twitter.comhttp://twitter.com/netik


Re: [twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread John Adams


On Dec 30, 2009, at 4:21 PM, Kyle Mulka wrote:


My application uploads a background image on a user's behalf. I want
to be able to figure out if they are still using the background image
at some future point in time.



The filename might work as a test for this, instead of the  
computationally expensive MD5 on an image hack.


We still retain the original file (basename) on images.

-j

---
John Adams (@netik)
Twitter Operations
j...@twitter.com
http://twitter.com/netik









[twitter-dev] Re: What You Put In Not The Same As What You Get Back Out

2009-12-30 Thread Kyle Mulka
My application uploads a background image on a user's behalf. I want
to be able to figure out if they are still using the background image
at some future point in time.

--
Kyle Mulka
Founder, Congo Labs
http://twilk.com

On Dec 30, 5:02 pm, Zac Bowling  wrote:
> Twitter has to host those files. Pure guess here but like thunbnails, it's
> not completely unresonable that they maybe want to optimize them for size to
> save a few dollars on the hosting bills.
>
> Why does it mater?
>
> Zac Bowling
>
> On Wed, Dec 30, 2009 at 1:27 PM, Kyle Mulka  wrote:
> > When uploading a background image, the image contents seems to get
> > modified. Seems like I should be able to do an MD5 sum on the file
> > before it is uploaded, upload the image to Twitter, and when I
> > download the image do another MD5 sum and the two should be the same.
> > But they aren't. Why?
>
> > --
> > Kyle Mulka
> > Founder, Congo Labs
> >http://twilk.com