fixed: Unable to upload new file to update contents of file asset
This commit is contained in:
parent
47d6a95a7f
commit
f17c5bc218
2 changed files with 11 additions and 5 deletions
|
|
@ -11,6 +11,9 @@
|
|||
http://www.plainblack.com/bugs/tracker/dataform-does-not-export-entry-information
|
||||
- fix: Image uploads only respect maximum size on update (Martin Kamerbeek / Oqapi)
|
||||
http://www.plainblack.com/bugs/tracker/image-uploads-only-respect-maximum-size-on-update
|
||||
- fix: Unable to upload new file to update contents of file asset (Martin
|
||||
Kamerbeek /Oqapi)
|
||||
http://www.plainblack.com/bugs/tracker/unable-to-upload-new-file-to-update-contents-of-file-asset
|
||||
|
||||
7.3.15
|
||||
- Added more documentation to WebGUI.pm
|
||||
|
|
|
|||
|
|
@ -161,8 +161,9 @@ sub getEditForm {
|
|||
|
||||
}
|
||||
$tabform->getTab("properties")->file(
|
||||
-label=>$i18n->get('new file'),
|
||||
-hoverHelp=>$i18n->get('new file description'),
|
||||
-name => 'newFile',
|
||||
-label => $i18n->get('new file'),
|
||||
-hoverHelp => $i18n->get('new file description'),
|
||||
);
|
||||
return $tabform;
|
||||
}
|
||||
|
|
@ -245,13 +246,15 @@ sub processPropertiesFromFormPost {
|
|||
my $self = shift;
|
||||
$self->SUPER::processPropertiesFromFormPost;
|
||||
delete $self->{_storageLocation};
|
||||
|
||||
my $fileStorageId = WebGUI::Form::File->new($self->session, {name => 'newFile'})->getValueFromPost;
|
||||
my $storage = WebGUI::Storage->get($self->session, $fileStorageId);
|
||||
|
||||
my $fileStorageId = WebGUI::Form::File->new($self->session, {name => 'file'})->getValueFromPost;
|
||||
my $storage = WebGUI::Storage->get($self->session, $fileStorageId);
|
||||
if (defined $storage) {
|
||||
$storage->setPrivileges($self->get('ownerUserId'), $self->get('groupIdView'), $self->get('groupIdEdit'));
|
||||
my $filename = $storage->getFiles()->[0];
|
||||
if (defined $filename && $filename ne $self->get("filename")) {
|
||||
|
||||
if (defined $filename) {
|
||||
my %data;
|
||||
$data{filename} = $filename;
|
||||
$data{storageId} = $storage->getId;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue