File storage

What is Shypyard file storage?

Every Shypyard app (backed by S3) comes with a file storage where files can be uploaded to from the tasks. You can use the file storage to export analytic data like csv of your product information

Usage Example

Using the example from earlier, here's a pseudo code to show upload file to filestorage.
1
const { auths, libs } = require('platform');
2
​
3
module.exports = async (event, options) => {
4
let lines = [
5
['name', 'price'],
6
['xyz', 123],
7
];
8
​
9
const csv = lines.map((e) => e.join(',')).join('\n');
10
console.log(csv);
11
​
12
const shypyard = libs.shypyard.get();
13
await shypyard.files.upload({
14
key: `export.csv`,
15
data: csv,
16
});
17
};
Copied!

Web UI

You can see the database value by going to Storage > Files section. Here you can do basic filtering on key prefix. And download files.

Full documentation

Please see the Shypyard SDK documention on shypyard files.

​

Last modified 7mo ago