Fetch: Rename Request File

Created on 23 Feb 2019  路  4Comments  路  Source: tonyofrancis/Fetch

Due to some reasons I first download a file with a temporary name and then rename the file to the desired one after its completely downloaded. for this case, I have to update the request in order to contain the correct path for later usage But I have to create a new Request object which will have a different ID, though it may be a good idea to add simple functions to Request Object to be able to modify file Path (which will update URI, download object if needed,... behind the scene as a result).
or to be cleaner I guess you could add a feature to save the file to a temporary file (set by a boolean maybe or a temporary path and then moving to desired path ,.. ) and then rename it to the final desired name when its completed so nothing is needed to be done on our side.

enhancement

Most helpful comment

A new method will be added in the next version of Fetch. will post back soon

All 4 comments

A new method will be added in the next version of Fetch. will post back soon

@tonyofrancis just wanted to mention that currently updateRequest will have a download with ADDED status which I guess that should just replace the request will the same download object

@Mahan3340 Fetch version 3.0.1 has been released and it includes this method. Please see the changelog

@tonyofrancis thank you so much

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gbirk picture gbirk  路  6Comments

Xenolion picture Xenolion  路  4Comments

marcin-adamczewski picture marcin-adamczewski  路  5Comments

Moeinh77 picture Moeinh77  路  4Comments

jpvs0101 picture jpvs0101  路  5Comments