strongloop

Modify image obtained from loopback-component-storage

时光毁灭记忆、已成空白 提交于 2019-11-27 13:56:30
问题 I am using loopback for storing Image to the server . I want to modify the file name of the file before getting saved to the server. Also I want to convert it to another thumbnail form before getting saved. Here is how I am doing. At client side Upload.upload( { url: '/api/containers/container_name/upload', file: file, fileName: "demoImage.jpg", //Additional data with file params:{ orderId: 1, customerId: 1 } }); At Server Side I am receiving the query "params" but not getting the "File Name"

Migrating built-in models to Databases

耗尽温柔 提交于 2019-11-27 06:10:25
问题 How to move built-in models like User, Roles, User-Role-Mapping etc... to the database we've created instead of the default datasource:db? The built-in models are not listing in Arc. I've tried creating a new model which inherits these base model. But, data is not saved into the new model. Please advice...I've been sitting on it for a couple of weeks. Thanks 回答1: Default "db" datasource is placed in memory. That is why your data are not persisted after you restart application. You have to

How to store files with meta data in LoopBack?

北城以北 提交于 2019-11-26 21:30:33
What I want to do: Have an html form, with a file input inside. When a file is chosen, the file input should upload the file, and get a file id, so when the form is submitted, the file id is posted with the form and written in the database. Shorter version: I want to store meta data (id for example) with my files. Sounds simple, yet I struggle to do that in LoopBack. There has been a couple conversations ( 1 , 2 ) about this topic, and neither seemed to lead to a solution, so I thought this might be a good place to find one once and for all. The simplest solution would be to use model

How to store files with meta data in LoopBack?

纵饮孤独 提交于 2019-11-26 07:59:02
问题 What I want to do: Have an html form, with a file input inside. When a file is chosen, the file input should upload the file, and get a file id, so when the form is submitted, the file id is posted with the form and written in the database. Shorter version: I want to store meta data (id for example) with my files. Sounds simple, yet I struggle to do that in LoopBack. There has been a couple conversations ( 1, 2 ) about this topic, and neither seemed to lead to a solution, so I thought this