Vojtech B
Vojtech B

Reputation: 2957

Identify downloaded file

I have a private file storage for users and I would like to enforce that the files are downloaded directly from my storage and not via some peer sharing. So I was wondering whether it would be possible to add few extra bytes to each downloaded file so it is still executable but if I find some reuploaded file I would be able to say which user downloaded it.

Is such approach possible?

Considered file format mights include: MS Word files, PDF, RAR, ZIP files

EDIT:

I was thinking more about the concept and one thing crossed my mind: What if I set the creation date & modified date of the file to a specific and unique date? For example: 1980/05/16 10:12:54

Of course - If someone wants to remove the stamp he can always do so but most of the users will not figgure it out.

Are there any problems with this approach? Do you see other "attributes" that could be set easily?

Upvotes: 2

Views: 93

Answers (1)

B.K.
B.K.

Reputation: 10152

It sounds like you may want to just stick to header data. A lot of file types you've listed allow for adding information you're talking about into their headers. Beyond that, you're talking about very varying structures and adding anything beyond their scope will require custom code for each file type.

Here's a good post on SO which discusses handling metadata (read through all the answers, not just the accepted one): Read/Write 'Extended' file properties (C#)

Upvotes: 1

Related Questions