request for info: how do the "preserve timestamp" and "temporary filename" settings coexist?

Advertisement

orlando.colamatteo
Joined:
Posts:
2
Location:
Denver, CO

request for info: how do the "preserve timestamp" and "temporary filename" settings coexist?

If I am uploading a file and both "preserve timestamp" and "upload using temporary filename" are set to true, what is the sequence of events that occur during the lifecycle of the file upload?

e.g. is it 1) upload to temp filename, 2) reset timestamp on temporary file, 3) rename file to permanent filename

or is it 1) upload to temp filename, 2) rename file to permanent filename, 3) reset timestamp on permanent file

Thanks.

Reply with quote

Advertisement

orlando.colamatteo
Joined:
Posts:
2
Location:
Denver, CO

Re: request for info: how do the "preserve timestamp" and "temporary filename" settings coexist?

I encountered a nasty scenario with an app where the upload completed but preserving the timestamp failed. because a failure was encountered my process later retried and it succeeded on all accounts, thereby delivering the file a second time. I know this is my issue, from a defensive programming perspective, but since the upload is to a temporary filename the rename seems like the safest possible last step in the critical path. therefore it would be nicer if the timestamp preservation happened before the rename from the temporary filename to the permanent filename. let me know if you agree, and if you would consider this as an enhancement please let me know how to submit it.

Reply with quote

martin
Site Admin
martin avatar

Re: request for info: how do the "preserve timestamp" and "temporary filename" settings coexist?

I'm afraid that some servers will bump the timestamp with the rename operation.

Reply with quote

Advertisement

You can post new topics in this forum