-
Notifications
You must be signed in to change notification settings - Fork 532
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 upload #172
Comments
I don't see file upload being handled in the code. You can go with your own custom component and use any of the exisiting file upload components that are out there (e.g here ) |
@cristijora Your commit will fix the issue right? |
Yes, the PR got merged and it will be available in the next build or if you need it now simply use the js from here |
@cristijora Thanks. 👍 |
@cristijora I got this error after integrating this js changes
|
I will look into it. |
@fizerkhan Try not to set the initial model value for the file input to an empty string. Does this appear every time you upload something or only initially? |
@cristijora It happens only after I select a file from the file dialog. I did not set any initial value to the model. My schema look like
I created model like
|
@cristijora It fixed by setting file value to ''.
I really don't how it works. but it works. |
Is anyone still looking into this? Just wanted to bump the thread, since I'm experiencing the same annoyance. The solution works, and files get transferred flawlessly, only the warning is something I'd like to omit in my final product. |
What kind of warning? |
@icebob The same warning fizerkhan received. It's a DOMException, but nothing crashes and the file selection works all the same. In my model I tried setting initial value to an empty string and null, but that doesn't make any difference. {
//ATTACHMENT
type: "input",
inputType: "file",
model: "attachments",
label: "Attachment",
files: true,
multiple: true,
styleClasses: 'col-md-6',
}, It happens right after you confirm which file to upload in the popup window. |
@BramVer Can you please set the value as empty string |
@fizerkhan You meant setting all values in the model to an empty string, right? That doesn't do it for me sadly, besides getting the same warning, other input fields dont work because they're not initialized of course. I see that you manually set this.model.file to an empty string, can I ask where you did this? I tried manually setting that in 'created' as well, but does nothing. |
@BramVer I did like this
and
Even after setting |
@fizerkhan This removed the warning, thank you. Instead of doing this (which is more in line with the structure of the code): name: '...',
model: {
start_date: moment(),
end_date: moment().add(1, 'days'),
description: "",
leave_type: null,
attachments: null,
},
schema: { ... } I now do this: created: function() {
this.model = VueFormGenerator.schema.createDefaultObject(this.schema);
this.model.start_date = moment();
this.model.end_date = moment().add(1, 'days');
this.model.attachments = '';
}, I still don't think this should be seen as a permanent solution, but more as a workaround, |
@BramVer Great. |
Not very sure whether it has been fixed. I did not follow the thread
unfortunately. Detected the issue and made a PR.
Maybe @icebob can provide more details here
…On 19 June 2017 at 09:16, Nathan Thorpe ***@***.***> wrote:
Hi @cristijora <https://github.com/cristijora>. Has this issue been
fixed? I'm receiving the same error as #172 (comment)
<#172 (comment)>
using 2.0.0-beta8
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#172 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APN0ZaUya7w_weuFAJOR8rc6DD6Cp_MRks5sFhJEgaJpZM4Msiwj>
.
|
Released in v2.1.1 |
I want to upload CSV file. What is the input type for file upload?
The text was updated successfully, but these errors were encountered: