Load file picker with feature attachments
I'm building a workflow that will be used to edit features with attachments, but I'm having trouble adding the files to the file picker. I used QueryAttachmentInfos to get array of the attached files, but I'm struggling with how (and if) I can pass the contents to the file picker control.
Dave
-
David Flack, the File Picker is intended for selecting files that you want to use in the workflow. It sounds like you already got the files from QueryAttachmentInfos. If you just want to present a list to select from or something like that, an Item Picker would be better. What did you want to use the File Picker for?
0 -
Thanks Ken Lyon. What I'm trying to do is present the attachments to the user so they can add or remove them. Would a better strategy be using the Item Picker for deletes and a File Picker for adds? It's a bit kludgy, but it sounds like it would work.
0 -
Yes, I think you would have to. I imagine something like this:
- Item Picker listing the current attachments.
- Button Bar with 2 buttons (Add/Delete)
- Section (Visible = false)
- File Picker
- Button Bar with 2 buttons (something like Confirm/Cancel)
For Delete, you could get the ids of the currently selected items in the item picker.
For Add, you could show the hidden section which would bring the file picker and second button bar into view. Cancel would hide the section, confirm would take the uploaded file and add it as an attachment, then refresh the list in the item picker.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer