Order the steps
Order a 'compress, then upload, then clean up' chain.
.then(cleanup)beginUniqueWork("upload-42", REPLACE, compress).then(upload)with a network constraint.enqueue()
Choose an answer, then open Show answer below to check it.
Show answer
Answer: B C A D
beginUniqueWork("upload-42", REPLACE, compress)Name the chain so duplicates replace it..then(upload)with a network constraint Only the upload needs the network..then(cleanup)Runs only after upload succeeds..enqueue()Nothing is scheduled until enqueue.