tus-node-server icon indicating copy to clipboard operation
tus-node-server copied to clipboard

Filename encoded

Open dougwit opened this issue 7 years ago • 2 comments

The tus js client automatically encodes the filename before adding it to the request, but the node server does not decode it. It would be nice to have automatic decoding instead of having to manually parse and decode the filename from event.upload_metadata.

{ file:
   { id: '236420e05a53609ddbf5d3104ca55551',
     upload_length: '48462',
     upload_metadata: 'filename bmV3bWFuLmpwZw==' } }

dougwit avatar Apr 19 '18 13:04 dougwit

we've added something like this here:

https://github.com/tus/tus-node-server/pull/89/files#diff-cf34f7e211aecb1cd3ae5f05a5cde2d8R242 (_parseMetadataString)

perhaps we could put that in a common place later on so it can be shared :)

rictorres avatar Apr 24 '18 07:04 rictorres

That sounds amazing, @rictorres!

Acconut avatar May 01 '18 07:05 Acconut