You are viewing limited content. For full access, please sign in.

Question

Question

Javascript to Process File Upload Automatically

asked on March 23, 2022 Show version history

I have a form, that via Javascript, is communicating with an API, that returns a file.

The file is automatically downloading and ending up in the user's Downloads folder, which is great.

But then I have to instruct the user to go upload said file from their Downloads folder.

I would really love to automate this piece, and have it automatically attach the document to the File Upload functionality.

Does anyone have any experience doing anything like this with Javascript?

Thank you!

0 0

Replies

replied on March 29, 2022

Would there be a way for the file to download into a network folder and have import agent pick it up?

1 0
replied on March 29, 2022

Thanks @████████- that would work to get it into the Repository.  But unfortunately for this situation, I need it available in the Forms process to be reviewed by other users in tasks later on in the process.

1 0
replied on March 23, 2022

Researching this, I guess it may not be possible for security reasons, which makes sense.

But if I could at least figure out how to get it to filter for the specific file name (instead of just the file type) that would be helpful - though I'm not having any luck with that either. sad

0 0
replied on March 23, 2022

Does it need to be in the upload field of the form for later stages in the process? If not, you can get the file from the web API behind the scenes via Workflow.

Even if the file needs to be reviewed later in the process, you might be able to get away with an iframe to the web client to show the document. I've had luck with that, though it's a little cumbersome. And I heard there were improvements coming to that kind of connection; not sure if they've been released yet.

0 0
replied on March 24, 2022

I had actually considered that, because technically, the API is downloading it to my sever, and then Forms is downloading it from the server to the local user's machine.  So I could have Workflow or even Import Agent grab it from the server and import it to the repository.  From there, I could like to it in the repository (not as an iFrame, we use the Windows Client, so it would have to be a shortcut file to the entry in the repository, which I've done lots of times in other forms).  Unfortunately, it's just not ideal for this process.  As I've continued to think about it.  Having it attached to the Form process is still best.  I just had hoped there was some way to streamline it for my users.

Unfortunately, the more I look for options to streamline this for the users, the more I feel that it probably isn't possible beyond what I've already done (given the users instructions stating: Attach this file: {filename} from your Downloads folder - if you copy that file name and paste it into the file name field that pops up, it'll ensure you grab the correct document").

It's just frustrating any time I have a recurring step with very little variation that I can't find a way to automate.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.