reactioncommerce / api-plugin-files Goto Github PK
View Code? Open in Web Editor NEWFiles plugin for the Reaction API
License: GNU General Public License v3.0
Files plugin for the Reaction API
License: GNU General Public License v3.0
Are you looking for help with getting started on Reaction? Please visit our Reaction documentation.
tried uploading jpeg and png files to product image.
shows up a blank image in media gallery.
create product, upload product image
media items show up in
{
"_id" : "MZF7qKCw94k2Bhuw2",
"metadata" : {
"priority" : 2,
"productId" : "SWBP6se8drwdWYBZd",
"variantId" : "WWAnoQhoJTtpM3Dvn",
"ownerId" : "dDGjoKDjMNv4SvhhG",
"shopId" : "5cQ3KnALddhPpJkin",
"workflow" : "published"
},
"original" : {
"name" : "Screenshot 2020-03-26 at 2.08.12 PM.png",
"size" : 19940,
"tempStoreId" : "d21d0441704c6bfa8c9137a7b2a59e6d",
"type" : "image/png",
"updatedAt" : ISODate("2020-03-26T06:08:18.309Z"),
"uploadedAt" : ISODate("2020-03-27T08:46:24.446Z")
}
}
in Catalog, shows up as
"media" : [
{
"priority" : 1,
"productId" : "SWBP6se8drwdWYBZd",
"variantId" : "WWAnoQhoJTtpM3Dvn",
"URLs" : {
"large" : "null",
"medium" : "null",
"original" : "null",
"small" : "null",
"thumbnail" : "null"
}
},
{
"priority" : 2,
"productId" : "SWBP6se8drwdWYBZd",
"variantId" : "WWAnoQhoJTtpM3Dvn",
"URLs" : {
"large" : "null",
"medium" : "null",
"original" : "null",
"small" : "null",
"thumbnail" : "null"
}
}
],
"metafields" : null,
==> typeDefault
api_1 | image/jpeg jpg image/jpeg
api_1 |
api_1 | 11:35:02.082Z INFO Reaction: After transformWrite file info is { name: 'WWuTm5nfvKx38A3yd.jpg', type: 'image/jpeg' }
api_1 | 11:35:02.083Z INFO Reaction: S3Store _fileKeyMaker fileRecord info: { name: 'WWuTm5nfvKx38A3yd.jpg', type: 'image/jpeg' }
api_1 | 11:35:02.084Z INFO Reaction: S3Store _fileKeyMaker fileRecord size: 38
api_1 | ReactionError: Error: Input buffer contains unsupported image format
api_1 | at Sharp.<anonymous> (file:///usr/local/src/app/node_modules/api-plugin-files/src/utils/transformWrite.js:37:11)
api_1 | at Sharp.emit (events.js:223:5)
api_1 | at Sharp.EventEmitter.emit (domain.js:475:20)
api_1 | at /usr/local/src/app/node_modules/sharp/lib/output.js:707:18 {
api_1 | eventData: {},
api_1 | error: 'error-sharp-resize-internal',
api_1 | isClientSafe: true,
api_1 | reason: [Error: Input buffer contains unsupported image format],
api_1 | details: {}
api_1 | }
api_1 | (node:105) ExperimentalWarning: The ESM module loader is experimental.
api_1 | 17:52:00.795Z ERROR Reaction: Cannot find package 'api-plugin-files' imported from /usr/local/src/app/node_modules/@reactioncommerce/api-core/src/importPluginsJSONFile.js
api_1 | Error: Cannot find package 'api-plugin-files' imported from /usr/local/src/app/node_modules/@reactioncommerce/api-core/src/importPluginsJSONFile.js
api_1 | at Loader.resolve [as _resolve] (internal/modules/esm/default_resolve.js:84:13)
api_1 | at Loader.resolve (internal/modules/esm/loader.js:73:33)
api_1 | at Loader.getModuleJob (internal/modules/esm/loader.js:147:40)
api_1 | at Loader.import (internal/modules/esm/loader.js:131:28)
api_1 | at importModuleDynamically (internal/modules/esm/translators.js:75:23)
api_1 | [nodemon] app crashed - waiting for file changes before starting...
Prerequisites
the core it looks for plugins in docker container first
{
'reaction-identity': '3.0.0',
npm: '6.14.4',
ares: '1.16.0',
brotli: '1.0.7',
cldr: '37.0',
http_parser: '2.9.3',
icu: '67.1',
llhttp: '2.0.4',
modules: '72',
napi: '6',
nghttp2: '1.41.0',
node: '12.18.0',
openssl: '1.1.1g',
tz: '2019c',
unicode: '13.0',
uv: '1.37.0',
v8: '7.8.279.23-node.37',
zlib: '1.2.11'
}
(node:75) DeprecationWarning: GridStore is deprecated, and will be removed in a future version. Please use GridFSBucket instead
api_1 | (node:75) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
api_1 | ReactionError: Error: Input buffer contains unsupported image format
api_1 | at Sharp.<anonymous> (file:///usr/local/src/app/node_modules/api-plugin-files/src/setUpFileCollections.js:99:19)
api_1 | at Sharp.emit (events.js:223:5)
api_1 | at Sharp.EventEmitter.emit (domain.js:475:20)
api_1 | at /usr/local/src/app/node_modules/sharp/lib/output.js:707:18 {
api_1 | eventData: {},
api_1 | error: 'error-sharp-resize-internal',
api_1 | isClientSafe: true,
api_1 | reason: [Error: Input buffer contains unsupported image format],
api_1 | details: {}
api_1 | }
api_1 | 19:53:24.757Z INFO Reaction: Stopping Reaction API...
api_1 | 19:53:24.758Z INFO Reaction: Running shutdown function "jobQueueShutdown" for plugin "job-queue"...
api_1 | Failing 1 jobs on queue stop.
api_1 | 19:53:24.765Z INFO Reaction: Shutdown function "jobQueueShutdown" for plugin "job-queue" finished in 6ms
api_1 | 19:53:24.775Z INFO Reaction: Reaction API stopped
api_1 | [nodemon] app crashed - waiting for file changes before starting...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.