-1

For a project, I'll need to know if my user has finished to download a file to delete it on my remote server. Is there a way to do that ?

cappie013
  • 2,354
  • 1
  • 22
  • 30

1 Answers1

0

There are a couple ways of doing this, some more efficient than others, but here is what I've come up with.

Download through your application

If your application is downloading/passing the file through to the user you can trigger a function at the end of the stream to delete the file.

S3 Bucket Access Logging

S3 has access server logs (http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html) that log information for each request. Depending on how your application is structured, you may be able to process these to see what's been accessed.

There may be up to a 30-60 minute delay in log availability

Other Options

There are some other options, though perhaps not ideal (without knowing the specifics of your application I don't know whether these are acceptable).

Community
  • 1
  • 1
Lorenzo Aiello
  • 497
  • 1
  • 7
  • 18