{"id":22053288,"url":"https://github.com/bertrandom/flickr-upload","last_synced_at":"2025-05-11T21:14:54.569Z","repository":{"id":25885558,"uuid":"29325944","full_name":"bertrandom/flickr-upload","owner":"bertrandom","description":"A simple Flickr uploader using OAuth that supports files, streams, and buffers.","archived":false,"fork":false,"pushed_at":"2023-03-22T18:00:50.000Z","size":5,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T21:51:37.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SVGKit/SVGKit","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertrandom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-16T00:57:15.000Z","updated_at":"2023-03-22T18:00:54.000Z","dependencies_parsed_at":"2022-07-24T07:31:55.027Z","dependency_job_id":null,"html_url":"https://github.com/bertrandom/flickr-upload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fflickr-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fflickr-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fflickr-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandom%2Fflickr-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandom","download_url":"https://codeload.github.com/bertrandom/flickr-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810272,"owners_count":21807759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T15:16:10.744Z","updated_at":"2025-05-11T21:14:54.550Z","avatar_url":"https://github.com/bertrandom.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flickr-upload\n\nA simple Flickr uploader using OAuth that supports files, streams, and buffers.\n\n## install\n\n```\nnpm install flickr-upload\n```\n\n## oauth credentials\n\nOAuth tokens with \"write\" access are required to use `flickr-upload`, but `flickr-upload` does not handle getting them. If you use Google Chrome, you can easily generate them with [flickr-oauth-dance](https://www.npmjs.com/package/flickr-oauth-dance).\n\n## usage\n\nThis shows the basic usage of `flickr-upload`:\n\n\n```\nvar flickr = require('flickr-upload')({\n\tconsumer_key: \"3eda09cb562caa5859dcbf6062ca9b7d\",\n\tconsumer_secret: \"b8f5c7f9d37a7e65\",\n\ttoken: \"72157649904431428-4cb322030200ac38\",\n\ttoken_secret: \"bbd90fb171b1c946\"\n});\n\nflickr.upload('./test.jpg', function(err, photoId) {\n\n\tif (err) {\n\t\tconsole.error(err);\n\t\treturn;\n\t}\n\n\tconsole.log(photoId);\n\n});\n```\n\n### config\n\nWhen requiring the library, pass in your OAuth configuration. The keys are:\n\n```\n{\n\tconsumer_key: \"3eda09cb562caa5859dcbf6062ca9b7d\",\n\tconsumer_secret: \"b8f5c7f9d37a7e65\",\n\ttoken: \"72157649904431428-4cb322030200ac38\",\n\ttoken_secret: \"bbd90fb171b1c946\"\n}\n```\n\nIt also supports an alternative config in the format generated by `flickr-oauth-dance`:\n\n```\n{\n\t\"api_key\": \"3eda09cb562caa5859dcbf6062ca9b7d\",\n\t\"api_secret\": \"b8f5c7f9d37a7e65\",\n\t\"access_token\": \"72157649904431428-4cb322030200ac38\",\n\t\"access_token_secret\": \"bbd90fb171b1c946\"\n}\n```\n\n### upload\n\n#### flickr.upload(photo [,config] [,callback])\n\nphoto can be a filepath, buffer, [request stream](https://github.com/request/request), or [readable stream](http://nodejs.org/api/fs.html#fs_fs_createreadstream_path_options).\n\nconfig supports the following options from the [Flickr Upload API](https://www.flickr.com/services/api/upload.api.html):\n\n```\ntitle\ndescription\ntags\nis_public, is_friend, is_family\nsafety_level\ncontent_type\nhidden\n```\n\nIf you're uploading a buffer, you can define a `filename` and `contentType`, otherwise it will try to automatically generate these from the buffer contents and use a generic filename like `photo.jpg`.\n\nThe callback function has the arguments (err, photoId).\n\n## examples\n\n### basic filepath\n\n```\nflickr.upload('./test.jpg');\n```\n\n### buffer\n\n```\nvar fs = require('fs');\nflickr.upload(fs.readFileSync('./test.jpg'));\n```\n\n### request stream\n\n```\nvar request = require('request');\nflickr.upload(request('https://farm9.staticflickr.com/8623/16015386389_872d309a89_z.jpg'));\n```\n\nDon't use the filename from the stream:\n\n```\nvar request = require('request');\nflickr.upload(request('https://farm9.staticflickr.com/8623/16015386389_872d309a89_z.jpg'), {strip_filename: true});\n```\n\n### readable stream\n\n```\nvar fs = require('fs');\nflickr.upload(fs.createReadStream('./test.jpg'));\n```\n\n## setting a title\n\n```\nflickr.upload('./test.jpg', {title: 'Test'});\n```\n\n## uploading as private\n\n```\nflickr.upload('./test.jpg', {is_public: 0});\n```\n\n## license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fflickr-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandom%2Fflickr-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandom%2Fflickr-upload/lists"}