Reserve a file location for streaming writes
Generates a validated ID and returns all paths needed to write the file. Does NOT create the file - caller should write to fullPath using streams or other means.
Original filename to preserve
File serving configuration
FileReservation with id, storedName, and fullPath
const reservation = await reserveFile('export.csv', { resourceStoreUri: 'file:///tmp/files', delimiter: '-'});const stream = createWriteStream(reservation.fullPath);// ... write CSV incrementally ...stream.end();const uri = getFileUri(reservation.storedName, transport, uriConfig); Copy
const reservation = await reserveFile('export.csv', { resourceStoreUri: 'file:///tmp/files', delimiter: '-'});const stream = createWriteStream(reservation.fullPath);// ... write CSV incrementally ...stream.end();const uri = getFileUri(reservation.storedName, transport, uriConfig);
Reserve a file location for streaming writes
Generates a validated ID and returns all paths needed to write the file. Does NOT create the file - caller should write to fullPath using streams or other means.