Is there a way to copy file from one APS (Forge) OSS bucket to another without needing to download the file locally? There is a solution posted Move files around on Forge, but it involves using Design Automation and has extra cost implications.
Is there another way?
Answering my own question here.
One can write a simple python script that calls
request.get()on downloadable signed url usingstream=Trueand callrequest.post()on the uploadable signed url. This will work for small files. For large files that need multipart upload, one would need to split the input stream into chunks and individually call on the multipart urls.Here is the python code that works for small and large files both:
You can then call this simply with source and target file information. The APS app (client id / secret) may or mayn't be the same for source and target. The code takes care of both.