 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Trevor Schroeder
RE: upload image [ reply ] 2007-03-03 07:01
|
If you have a file on disk, you should pretty much always use upload_file and it will do the magic for you.
Let's say you had the contents of a JPEG in a database instead of a file. You can't very easily point at "that specific row's data field" and expect everything to just work. You could however pull out the blob from the database and use upload_image to upload it.
Basically, if you don't know why you'd use upload_image, then you shouldn't be using it. :)
When you upload async, flickr gives you back a ticket after the image uploads which you can present later to see if it's done doing all the necessary post-upload processing like storing it in the database, thumbnailing it, etc. You only wait for the upload to complete, not the other parts.
|
By: michael scott
RE: upload image [ reply ] 2007-03-02 13:03
|
thank you trevor...im still confused with what 'data' should be for upload_image...and when to use async or not...?
what i have is:
upload_image(?data?,"image/jpeg",path/to/file/image.jpg,"title here","description here","tag1 tag2 tag3",1,1,1)
thanks
|
By: Trevor Schroeder
RE: upload image [ reply ] 2007-03-02 12:02
|
If you look at sample/loadr.rb, that should be pretty easy to follow.
upload_image (where you specify mime type) is really only necessary if you're not uploading a file. For example, if the images are coming out of a database or being programmatically generated, you can feed the data straight to upload_image.
Otherwise upload_file is the way to go.
|
By: anil k
RE: upload image [ reply ] 2006-12-05 20:21
|
|
luckily I did this on my own after hours of playing around!! If someone needs help post a message here and I can paste an example.
|
By: anil k
upload image [ reply ] 2006-12-04 22:09
|
need help with image upload
I have been trying to upload images using rflickr.
I see that these are the critical fields necessary ..... data,mimetype,filename.
can anyone give a basic example of uploading using a form.
|
|
 |