How can I customize fileID

Started by swing3 replies254 views
swingOriginal post
#1

Hi,
I wish to customize the addition of the file ID, yet I have not discovered any related information in the documentation or source code. Are there any extension methods available?

#3

Perhaps I didn’t make it clear, the file ID I mentioned was handled by Uppy and serves as a key stored in the localSrorage.I want to use the MD5 of the file as the file ID instead of the file name, file size and file modification time.

marius
#4

That wasn’t clear from your first comment, thanks for clearing up. File ID is a very overloaded term, so without further distinction, it is hard to know what is meant exactly.

You can have a look at the fingerprint option for tus-js-client: tus-js-client/docs/api.md at main · tus/tus-js-client · GitHub, which is responsible for generating the value that you seem to be referring to. However, Uppy has its own fingerprint handling, so I am unsure whether you can overwrite Uppy’s fingerprint method:

Someone else might be better equipped to answer that.