#File Extension Not Allowed

1 messages · Page 1 of 1 (latest)

jovial vigil
#

I have no permissions yet am seeing this error in an attempt to create a .tar file my array buffer of an image in my storage using this ```js
const result = await storage.getFileView('SID', 'FID');
const buffer = Buffer.from(result);
const pack = tar.pack();
pack.entry({ name: IMG_0930.png }, buffer, () => {
pack.finalize();
});

const chunks = [];
pack.on('data', (chunk) => chunks.push(chunk));
pack.on('end', async () => {
  const tarBuffer = Buffer.concat(chunks);

  const filename = 'images.tar'; 
  const uploadedFile = await storage.createFile(
      config.storageId, 
      ID.unique(), 
      InputFile.fromBuffer(tarBuffer, filename) 
  );

});``` would appreciate the help pls

topaz cloud
jovial vigil