1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Fix uploading photo.

This commit is contained in:
Thomas Tanghus 2013-03-04 15:11:55 +01:00
parent 8bf571f7e2
commit d5acb5b9ed
2 changed files with 2 additions and 0 deletions

View File

@ -1395,6 +1395,7 @@ OC.Contacts = OC.Contacts || {
var file = filelist[0]; var file = filelist[0];
var target = $('#file_upload_target'); var target = $('#file_upload_target');
var form = $('#file_upload_form'); var form = $('#file_upload_form');
form.find('input[name="id"]').val(this.currentid);
var totalSize=0; var totalSize=0;
if(file.size > $('#max_upload').val()){ if(file.size > $('#max_upload').val()){
OC.notify({ OC.notify({

View File

@ -1,4 +1,5 @@
<form class="float" id="file_upload_form" action="<?php print_unescaped(OCP\Util::linkTo('contacts', 'ajax/uploadphoto.php')); ?>" method="post" enctype="multipart/form-data" target="file_upload_target"> <form class="float" id="file_upload_form" action="<?php print_unescaped(OCP\Util::linkTo('contacts', 'ajax/uploadphoto.php')); ?>" method="post" enctype="multipart/form-data" target="file_upload_target">
<input type="hidden" name="id" value="">
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"> <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
<input type="hidden" name="MAX_FILE_SIZE" value="<?php p($_['uploadMaxFilesize']) ?>" id="max_upload"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php p($_['uploadMaxFilesize']) ?>" id="max_upload">
<input type="hidden" class="max_human_file_size" value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)"> <input type="hidden" class="max_human_file_size" value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)">