-
Notifications
You must be signed in to change notification settings - Fork 931
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
create no-embbed option for exporting issues #4799
base: stable-3_3_0
Are you sure you want to change the base?
create no-embbed option for exporting issues #4799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Godoy0722 I've left some comments.
One very important thing that's missing is the way back. I mean, it should be possible to import this new format.
Please, also take a look if there are no more <embed>
s in the other applications (OPS and OMP).
{/fbvFormSection} | ||
|
||
{fbvFormSection list="true" title="plugins.importexport.native.exportOptions"} | ||
{fbvElement type="checkbox" id="no-embed" name="no-embed" label="plugins.importexport.native.noEmbedOption" checked=$noEmbed|default:false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you've included the option on the UI, then it makes sense to include the other alternative, it should be a radio (embed | relative | URL).
@@ -135,7 +135,7 @@ | |||
<element name="original_file_name" type="string" minOccurs="1" maxOccurs="1" /> | |||
<element name="date_uploaded" type="date" minOccurs="1" maxOccurs="1" /> | |||
<element name="date_modified" type="date" minOccurs="1" maxOccurs="1" /> | |||
<element name="embed" type="pkp:embed" /> | |||
<element name="embed" type="pkp:embed" minOccurs="0" maxOccurs="1" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Include the
href
element (min 0/max 1), with the attributeshref
andmime_type
. - The schema should specify that there should be one
<href>
OR one<embed>
p.s.: There's another occurrence of this update.
$embedNode = $doc->createElementNS($deployment->getNamespace(), 'embed', base64_encode(file_get_contents($filePath))); | ||
$embedNode->setAttribute('encoding', 'base64'); | ||
$issueFileNode->appendChild($embedNode); | ||
if (empty($this->opts['no-embed'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wherever you added support for the no-embed, there should be also the URL (I didn't check, but I assume it's possible), just to keep the standard.
$request = Application::get()->getRequest(); | ||
$baseUrl = $request->getBaseUrl(); | ||
$context = $deployment->getContext(); | ||
$fileUrl = $baseUrl . '/' . $context->getPath() . '/public/' . $coverImage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This public
path isn't standard, you need to use the class PublicFileManager
.
Co-authored-by: Jonas Raoni Soares da Silva <[email protected]>
Co-authored-by: Jonas Raoni Soares da Silva <[email protected]>
Co-authored-by: Jonas Raoni Soares da Silva <[email protected]>
@jonasraoni I just made the requested updates. I'll also take a look at OMP and OPS and will open PR forms for them if it's possible to change it there. I also see that my validation was not used anywhere - I forgot to implement the validation, but it's not required, so I removed it. |
Description: I added a
--no-embbed
option for the CLI and the system interface. It reduces the memory usage, as for faster responses and lighter XML files. It solves the issue #9769.