Home > front end >  Web applications to provide an interface file download, how to return the file deleted this kind of
Web applications to provide an interface file download, how to return the file deleted this kind of

Time:09-16

Provide the file download interface, set the Content - Disposition as the attachment, the file is read flow back, for larger files, in the process of download, if take a small file cover the original file with the cp command, will lead to download directly interrupt, browsers don't complain, download is not a complete file, is there a way to avoid it, or to the browser downloader returns a file does not exist error

CodePudding user response:

A question,
Why do you use the cp command overwrite the original file?

CodePudding user response:

The
reference 1/f, Applied Sciences response:
a question,
Why do you use the cp command overwrite the original file?


Needs to consider various extreme scenario, in the process of file download the original file for cp can download properly after the rm, mv

CodePudding user response:



Is probably to get this effect, the response head what to set to make the browser that failed download,

This is to test the s3 object outside the chain I download, use different browsers have different effect, when you use the Google, even deleted objects, can still download success, with 360 test stopped immediately after removing objects, then an error,

CodePudding user response:

What you said is the data synchronization problem.
Storage location and storage location B
B provide now, used to real-time updates,
A to B after midnight every day

A written on the page, what time update the data every day, is not solved?

CodePudding user response:

360 to recognize that only the function of the browser itself

CodePudding user response:

reference 4 floor Applied Sciences response:
what you said is the data synchronization problem.
Storage location and storage location B
B provide now, used to real-time updates,
A to B after midnight every day

A written on the page, what time update the data every day, is not solved?


Not data synchronization, they assume that only a data, a user in the download, user b just delete, or covering operations, such as

I checked the difference between and among rm mv cp and rm is actually delete a reference, if there is a process to take up, would not really deleted, until the end of the process to take up the original file system (mv) in the same file system, carried out the rm is similar to the original file, as for cp, the principle is to move the file pointer to the head, then cover the old data with new data, because read a file is read, a 2 g files, at the time of reading to 1 g, if use a 20 k file cover, that continue to read the back of the data is empty, read a file of the process is over, download browser will lead to an early end to end, download is not a complete file,
  • Related