Web Connection
How to get a reference to a javascript object
Gravatar is a globally recognized avatar based on your email address. How to get a reference to a javascript object
  Richard Kaye
  All
  Mar 29, 2023 @ 04:19pm

We're using plUpload in our WWC app. The implementation is loosely based on the examples provided in the fine documentation back in the day before Rick switched to Uppy. There is a file container that is created in js. The UI looks like this:

I'm looking to figure out how to get the collection of files added to this container so I can do some pre-upload processing. I realize this is a pretty abstract question without any code snippets but I'm still trying to figure out how to ask the question. 😃

Any and all clues gratefully accepted.

Gravatar is a globally recognized avatar based on your email address. re: How to get a reference to a javascript object
  Richard Kaye
  Richard Kaye
  Mar 31, 2023 @ 01:30pm

Talking to myself here.. 😃

There appears to be a files collection/array in the plUpload js. Now how do I get access to that in a format consumable by VFP...

Gravatar is a globally recognized avatar based on your email address. re: How to get a reference to a javascript object
  Rick Strahl
  Richard Kaye
  Apr 1, 2023 @ 11:28am

you pass in a JSON string, assign it to a variable in JavaScript, then use code to manipulate the object/collection.

IOW you you code-gen the JavaScript data code.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: How to get a reference to a javascript object
  Richard Kaye
  Rick Strahl
  Apr 1, 2023 @ 11:51am

Thanks, Rick. But before I can do that I need to figure out how to get the right stuff from the container itself.

I found another way to accomplish what I wanted leaving the black box of the js alone.

© 1996-2026