You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there are "two ways" how to download a file, even though they are not related that much internally, but from external API point of view they seems similar. There is downloadFile and downloadFileFromCollection. I think these could be merged into downloadFile where its signature would be extended with optional parameter path to downloadFile(reference: Reference | string, path?: string) and if path would be specified than it would use "download file from collection" approach and if not specified than it would use "download file" approach. This would affect both downloadFile and downloadFileReadable.
Another suggestion is actually to drop the uploadFilesFromDirectory method and instead provide this functionality through utility function that would build collection and actually create new method uploadCollection as I have already proposed in #172 that you would pass the collection to.
Also another thing is that I would like to unify usage of the return type of Reference and ReferenceResponse choose one or the other and use it consistently. I would lean to use Reference I guess. Should verify that the responses does not contain some useful data in headers that should be extracted and passed along like with File object.
The text was updated successfully, but these errors were encountered:
I have discovered few possible improvements:
Currently, there are "two ways" how to download a file, even though they are not related that much internally, but from external API point of view they seems similar. There is
downloadFile
anddownloadFileFromCollection
. I think these could be merged intodownloadFile
where its signature would be extended with optional parameter path todownloadFile(reference: Reference | string, path?: string)
and if path would be specified than it would use "download file from collection" approach and if not specified than it would use "download file" approach. This would affect bothdownloadFile
anddownloadFileReadable
.Another suggestion is actually to drop theuploadFilesFromDirectory
method and instead provide this functionality through utility function that would build collection and actually create new methoduploadCollection
as I have already proposed in #172 that you would pass the collection to.Also another thing is that I would like to unify usage of the return type of
Reference
andReferenceResponse
choose one or the other and use it consistently. I would lean to useReference
I guess. Should verify that the responses does not contain some useful data in headers that should be extracted and passed along like withFile
object.The text was updated successfully, but these errors were encountered: