dropbox-sdk-js icon indicating copy to clipboard operation
dropbox-sdk-js copied to clipboard

feat: add possibility to request for all (`filesSaveUrl`) jobs (optionally filtered)

Open MichaelDeBoey opened this issue 4 years ago • 3 comments

Why is this feature valuable to you? Does it solve a problem you're having?

I'm currently uploading some files to Dropbox using the filesSaveUrl method.

It seems like the the filesSaveUrl method always launches an async job, so the return type of these requests are all of type LaunchResultBaseAsyncJobId.

There's currently no way on getting all the launched jobs, so I have to somehow persist these AsyncJobId's and call filesSaveUrlCheckJobStatus after that.

Describe the solution you'd like

I'd like to propose a new filesSaveUrlCheckJobStatuses that will give me all the statuses of my launched jobs. Adding a filter so I can only see the pending/failed jobs would be a good addition too.

const dropbox = new Dropbox({ accessToken: process.env.DROPBOX_TOKEN });

dropbox.filesSaveUrlCheckJobStatuses({ filter: { '.tag': ['in_progress', 'failed'] } });

Describe alternatives you've considered

Persist all AsyncJobId's and call filesSaveUrlCheckJobStatus for each AsyncJobId

MichaelDeBoey avatar Jul 03 '21 15:07 MichaelDeBoey

Thanks! I'm sending this along as a feature request as well.

greg-db avatar Jul 05 '21 17:07 greg-db

@greg-db I would be happy to contribute a PR for this, but as there's no API endpoint for it, I can't really do anything I'm afraid 🤔😕

MichaelDeBoey avatar Aug 20 '21 20:08 MichaelDeBoey

@MichaelDeBoey Thanks! Yes, that's correct, we'd need to implement this on the API itself first.

greg-db avatar Aug 20 '21 20:08 greg-db