Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image processing Meteor CollectionFS:S3 GraphicsMagick不调整图像大小_Image Processing_Meteor_Amazon S3_Graphicsmagick_Collectionfs - Fatal编程技术网

Image processing Meteor CollectionFS:S3 GraphicsMagick不调整图像大小

Image processing Meteor CollectionFS:S3 GraphicsMagick不调整图像大小,image-processing,meteor,amazon-s3,graphicsmagick,collectionfs,Image Processing,Meteor,Amazon S3,Graphicsmagick,Collectionfs,我正在使用Meteor CollectionFS和GraphicsMagick 1.3.22调整上传到Amazon S3的图像的大小。图像不会调整大小,只是以S3全尺寸显示。我也试着把调整大小的图片放在一个单独的商店里,但是在新的商店里,图片仍然是全尺寸的 这是我的服务器/collections.js FS.debug = true; var imageStore = new FS.Store.S3("images", { bucket: "meteor-s3-test-data",

我正在使用Meteor CollectionFS和GraphicsMagick 1.3.22调整上传到Amazon S3的图像的大小。图像不会调整大小,只是以S3全尺寸显示。我也试着把调整大小的图片放在一个单独的商店里,但是在新的商店里,图片仍然是全尺寸的

这是我的服务器/collections.js

FS.debug = true;

var imageStore = new FS.Store.S3("images", {
    bucket: "meteor-s3-test-data",
    accessKeyId: "XXX",
    folder: "images",
    secretAccessKey: "XXX",
    transformWrite: createThumb
});

var createThumb = function(fileObj, readStream, writeStream) {
    gm(readStream, fileObj.name()).resize('100', '100').stream().pipe(writeStream);
};

ProfileCollection = new Mongo.Collection('ProfileCollection');

PhotoCollection = new FS.Collection("PhotoCollection",
{
    stores: [
        imageStore,
    ],
    filter: {
      maxSize: 3145728,
      allow: {
        contentTypes: ['image/*'],
        extensions: ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG']
      }
    }
});
var imageStore = new FS.Store.S3("images");

ProfileCollection = new Mongo.Collection('ProfileCollection');

PhotoCollection = new FS.Collection("PhotoCollection",
{
    stores: [
        imageStore,
    ],
    filter: {
      maxSize: 3145728,
      allow: {
        contentTypes: ['image/*'],
        extensions: ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG']
      }
    }
});
还有我的客户机/collections.js

FS.debug = true;

var imageStore = new FS.Store.S3("images", {
    bucket: "meteor-s3-test-data",
    accessKeyId: "XXX",
    folder: "images",
    secretAccessKey: "XXX",
    transformWrite: createThumb
});

var createThumb = function(fileObj, readStream, writeStream) {
    gm(readStream, fileObj.name()).resize('100', '100').stream().pipe(writeStream);
};

ProfileCollection = new Mongo.Collection('ProfileCollection');

PhotoCollection = new FS.Collection("PhotoCollection",
{
    stores: [
        imageStore,
    ],
    filter: {
      maxSize: 3145728,
      allow: {
        contentTypes: ['image/*'],
        extensions: ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG']
      }
    }
});
var imageStore = new FS.Store.S3("images");

ProfileCollection = new Mongo.Collection('ProfileCollection');

PhotoCollection = new FS.Collection("PhotoCollection",
{
    stores: [
        imageStore,
    ],
    filter: {
      maxSize: 3145728,
      allow: {
        contentTypes: ['image/*'],
        extensions: ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG']
      }
    }
});
还有我的FS.debug日志

FileWorker ADDED - calling deleteChunks for i5BrCN6rZwLoPuXy4
Meteor._wrapAsync has been renamed to Meteor.wrapAsync
TempStore is mounted on storage.gridfs
FileWorker ADDED - calling deleteChunks for 8BFzyhkoLyE4RGPES
FS.HTTP.unmount:
{}
Registered HTTP method URLs:
/cfs/files/:collectionName/:id/:filename
/cfs/files/:collectionName/:id
/cfs/files/:collectionName
token: eyJhdXRoVG9rZW4iOiJyYmx0cFd3YzUxVUlqd0JfaVhrck1RSVdmbE5wRmFKdXZFYjZvRXBWek5kIn0=
GET FILERECORD: 8BFzyhkoLyE4RGPES
Read file "me.jpg" bytes 0-14428/14429
createReadStream images
createReadStreamForFileKey images
Insertion in security = true
token: eyJhdXRoVG9rZW4iOiJyYmx0cFd3YzUxVUlqd0JfaVhrck1RSVdmbE5wRmFKdXZFYjZvRXBWek5kIn0=
HTTP PUT (update) handler received chunk:  0
GET FILERECORD: eLdMFShwMftTZAL4r
Insertion in security = true
createWriteStream _tempstore, internal: true
createWriteStreamForFileKey _tempstore
SA GridFS - DONE!
-----------STORED STREAM _tempstore
-----------CLOSE STREAM _tempstore
TempStore progress: Received 1 of 1 chunks for me.jpg
UPDATE: {"$set":{"uploadedAt":"2015-10-30T01:02:35.356Z"},"$unset":{"chunkCount":1,"chunkSum":1,"chunkSize":1}}
me.jpg was successfully uploaded. You are seeing this informational message because you enabled debugging and you have not defined any listeners for the "uploaded" event on the PhotoCollection collection.
FileWorker ADDED - calling saveCopy images for eLdMFShwMftTZAL4r
saving to store images
createWriteStream images, internal: false
createWriteStreamForFileKey images
FS.TempStore creating read stream for eLdMFShwMftTZAL4r
createReadStream _tempstore
createReadStreamForFileKey _tempstore
GRIDFS { _id: 5632c1ab10a4ad2c48853ad5, root: 'cfs_gridfs._tempstore' }
FileWorker CHANGED - calling saveCopy images for eLdMFShwMftTZAL4r
saving to store images
createWriteStream images, internal: false
createWriteStreamForFileKey images
FS.TempStore creating read stream for eLdMFShwMftTZAL4r
createReadStream _tempstore
createReadStreamForFileKey _tempstore
GRIDFS { _id: 5632c1ab10a4ad2c48853ad5, root: 'cfs_gridfs._tempstore' }
FileWorker REMOVED - removing all stored data for 8BFzyhkoLyE4RGPES
---SA REMOVE
-----------FINISH STREAM images
-----------FINISH STREAM images
-----------FINISH STREAM images
-----------FINISH STREAM images
SA S3 - DONE!!
-----------STORED STREAM images
-----------STORED STREAM images
SA images stored PhotoCollection/eLdMFShwMftTZAL4r-me.jpg
FS.File._saveChanges: images
UPDATE: {"$set":{"copies.images":{"name":"me.jpg","type":"image/jpeg","size":14429,"key":"PhotoCollection/eLdMFShwMftTZAL4r-me.jpg","updatedAt":"2015-10-30T01:02:35.790Z","createdAt":"2015-10-30T01:02:35.790Z"}}}
FS.File._saveChanges: _original
UPDATE: {"$set":{"original":{"name":"me.jpg","updatedAt":"2015-10-23T19:33:23.512Z","size":14429,"type":"image/jpeg"}}}
me.jpg was successfully saved to the images store. You are seeing this informational message because you enabled debugging and you have not defined any listeners for the "stored" event on the PhotoCollection collection.
FileWorker ADDED - calling deleteChunks for eLdMFShwMftTZAL4r
---SA REMOVE
SA S3 - DONE!!
-----------STORED STREAM images
-----------STORED STREAM images
SA images stored PhotoCollection/eLdMFShwMftTZAL4r-me.jpg
FS.File._saveChanges: images
UPDATE: {"$set":{"copies.images":{"name":"me.jpg","type":"image/jpeg","size":14429,"key":"PhotoCollection/eLdMFShwMftTZAL4r-me.jpg","updatedAt":"2015-10-30T01:02:35.884Z","createdAt":"2015-10-30T01:02:35.884Z"}}}
FS.File._saveChanges: _original
UPDATE: {"$set":{"original":{"name":"me.jpg","updatedAt":"2015-10-23T19:33:23.512Z","size":14429,"type":"image/jpeg"}}}
me.jpg was successfully saved to the images store. You are seeing this informational message because you enabled debugging and you have not defined any listeners for the "stored" event on the PhotoCollection collection.
token: eyJhdXRoVG9rZW4iOiJyYmx0cFd3YzUxVUlqd0JfaVhrck1RSVdmbE5wRmFKdXZFYjZvRXBWek5kIn0=
GET FILERECORD: eLdMFShwMftTZAL4r
Read file "me.jpg" bytes 0-14428/14429
createReadStream images
createReadStreamForFileKey images
token: eyJhdXRoVG9rZW4iOiJDMTFjd3lwUnJVU3NKRlZNUXNodWxQblJScXkyOXFxZklZcjc4bVBTT2pJIn0=
GET FILERECORD: eLdMFShwMftTZAL4r
Read file "me.jpg" bytes 0-14428/14429
createReadStream images
createReadStreamForFileKey images
^C[ec2-user@ip-10-0-0-5 udormio_build]$ [ec2-user@ip-10-0-0-5 udormio_build]$ no bundle/main.js
FileWorker ADDED - calling deleteChunks for-bash: [ec2-user@ip-10-0-0-5: command not found
i5BrCN6rZwLoPuXy4
Meteor._wrapAsync has been renamed to Meteor.wrapAsync
TempStore is mounted on storage.gridfs
FileWorker ADDED - calling deleteChunks for 8BFzyhkoLyE4RGPES
FS.HTTP.unmount:
{}
[ec2-user@ip-10-0-0-5 udormio_build]$ FileWorker ADDED - calling deleteChunks for i5BrCN6rZwLoPuXy4
Registered HTTP method URLs:
/cfs/files/:collectionName/:id/:filename
/cfs/files/:collectionName/:id
/cfs/files/:collectionName
token: eyJhdXRoVG9rZW4iOiJyYmx0cFd3YzUxVUlqd0JfaVhrck1RSVdmbE5wRmFKdXZFYjZvRXBWek5kIn0=
GET FILERECORD: 8BFzyhkoLyE4RGPES
Read file "me.jpg" bytes 0-14428/14429
createReadStream images
createReadStreamForFileKey images
Insertion in security = true
token: eyJhdXRoVG9rZW4iOiJyYmx0cFd3YzUxVUlqd0JfaVhrck1RSVdmbE5wRmFKdXZFYjZv-bash: FileWorker: command not found
RXBWek5kIn0=
HTTP PUT (update) handler received chunk:  0
GET FILERECORD: eLdMFShwMftTZAL4r
Insertion in security = true
createWriteStream _tempstore, internal: true
createWriteStreamForFileKey _tempstore
SA GridFS - DONE!

谢谢。

我必须同时安装GraphicsMagick和ImageMagick