@artsy/gemup

中文文档
0.2.0发布于 2023/12/15MIT近 30 天下载 1万

Lightweight Javascript utility for using Artsy's Gemini service to upload directly to S3.

原始使用文档
文档目录5 节
  1. Installation
  2. Install with Yarn/NPM
  3. Example usage
  4. JavaScript
  5. License

gemup

Lightweight Javascript utility for using Artsy's Gemini service to upload directly to S3. Used internally at Artsy, so not useful to general public—but open source by default!

Installation

Use gemup one of three ways:

Install with Yarn/NPM

yarn add @artsy/gemup

Example usage

JavaScript

Import into your project:

import gemup from "@artsy/gemup";

Add an upload function and reference it on an <input>:

const handleUploadClick = (e) => {
  gemup(e.target.files[0], {
    app: "force",
    geminiHost: 'https://media.artsy.net',
    fail: function (err) {
      console.log("Ouch!", err);
    },
    add: function (src) {
      console.log("We got a data-uri image client-side!", src);
    },
    progress: function (percent) {
      console.log("<3 progress bars, file is this % uploaded: ", percent);
    },
    done: function (src) {
      console.log("Done uploading, here's the S3 url: ", src);
    },
  });
};

...

<input type="file" multiple={false} onChange={(e) => handleUploadClick(e)} />

License

MIT

版本与发布记录

@artsy/gemup 共发布 3 个版本,首次发布于 2019/04/03;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.2.0latest2023/12/152 年前
0.1.02020/08/016 年前
0.0.32019/04/037 年前

关于 @artsy/gemup 的常见问题

@artsy/gemup 是什么?

Lightweight Javascript utility for using Artsy's Gemini service to upload directly to S3.

如何安装 @artsy/gemup?

在项目目录运行 npm install @artsy/gemup,或使用 pnpm add / yarn add / bun add。

@artsy/gemup 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/artsy__gemup 是否存在。

@artsy/gemup 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >= 0.10.x。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@artsy/gemup 可以商用吗?

@artsy/gemup 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@artsy/gemup 的下载量有多少?

根据 npm 官方下载统计,@artsy/gemup 在 2026/10/07 – 2026/11/05 这 30 天内被下载 10,356 次,日均约 345 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@artsy/gemup 还在维护吗?

最新版本 0.2.0 发布于 2023/12/15(2 年前);至今共发布 3 个版本,其中过去 12 个月发布了 0 个;首次发布于 2019/04/03。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。