Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File uploader #2

Open
bkolev opened this issue Jan 6, 2014 · 3 comments
Open

File uploader #2

bkolev opened this issue Jan 6, 2014 · 3 comments

Comments

@bkolev
Copy link

bkolev commented Jan 6, 2014

Firstly let me offer my congratulations on your project. It's amazing !

I am writing this, because I can't connect uploaded files to a already created document. Is it possible this trick, or i should use another upload plugin ? I am developing a lawyer system, where each case (each document) need uploaded docs and information. I ran this plugin, I have already uploaded files, everything is OK, but I can't make uploaded files responses to the document, also when I open some case i want to see all attachments responses.

Any advice will be appreciated !

@markleusink
Copy link
Owner

Are you talking about the jQuery File Upload plugin I integrated on the demos on the http://www.bootstrap4xpages.com site? That demo currently doesn't have a feature to show existing file from a document. To add the files as responses to a current document you need to change the code in the UploadHandler class to create those.

@bkolev
Copy link
Author

bkolev commented Jan 7, 2014

Yes, I'm talking about jQuery File Upload plugin. And yes, I thought I need to edit the UploadHandler, but I don't know how to get Parent document (unid) to make response. Could you tell me how to get it ?

P.S. today I found little bug (I think) about the size of files which I'm uploading. I increase MAX_FILE_SIZE_BYTES to 10MB. So ... in chrome, after i clicked "START" button, it appears that the file is too large, but In Mozilla works fine.

Thanks !

@markleusink
Copy link
Owner

Hi Boril,

Sorry for not getting back to you earlier. Pretty hectic around here in
preparation for my IBM Connect session.

I'll look into the issue you reported. About the parentUnid: you can do 2
things: on opening on the upload XPage, set a sessionScope variable and
read that in the UploadHandler class. Or: send the parent ID along with the
file to the server. To do that you need to change the clientside JavaScript
a bit. Especially this line:

formData : { 'not' : 'relevant' },

You might want to change that to

formData : { 'parentUnid' : '' },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants