I am trying to tune/implement max conversation attachment upload file size for Plone 4.1 and Ploneboard.
The code processing the uploads seems to be this in PloneBoard:
# Create files in message
if files:
for file in files:
# Get raw filedata, not persistent object with reference to tempstorage
# file.data might in fact be OFS.Image.Pdata - str will piece it all together
attachment = File(file.getId(), file.title_or_id(), str(file.data), file.getContentType())
m.addAttachment(attachment)
Where and how uploaded filesizes are adjusted in Plone, Zope and Ploneboard?
Looks like this one was controlled in PloneBoard forum Edit page settings directly.
Related
I'm using Veeva Vault for a project, and I'm unable to get the Related Shared Resource option to work. I'm basically uploading an HTML5 page, and I want to link to a global css file.
This is the Help Guide - http://vaulthelp2.vod309.com/wordpress/applications/promotional-materials-edition/using-clm-integration/
In Veeva, I have a binder presenation, which houses all of my key messages. The key message structure looks like this:
myfilename.zip
myfilename
myfilename.html
myfilename-full.jpg
myfilename-thumb.jpg
assets
css
img
js
I used the Veeva CRM App to get them to display on the iPad. This works fine. I can see my presentation and all of the slides (key messages).
I created a shared folder that looks like this:
[shared]
mysharedname.zip
mysharedname
mysharedname-full.jpg
mysharedname-thumb.jpg
css
img
js
The shared folder is created by Veeva (according to this - https://crmhelp.veeva.com/doc/Content/Print-only_topics/CLM%20Content%20Creation%20Guide.pdf - pg. 70). In Veeva, I added the files as a slide using these options:
Name
Type (Slide)
Country
CLM Properties (Yes)
Product
Renditions
The link to the shared folder in my HTML5 file looks like this:
<link rel="stylesheet" href="../shared/css/main.css">
Once uploaded, I went to the myfilename slide, and checked the Related Shared Resource option, and selected the mysharedname slide. I performed a Force Full Refresh, and synced. The class I set in the mysharedname/css file does not display.
I've tried variations with folder names, added the shared file to the Binder, changed the path of the link to ../shared/mysharedname/css/main.css, etc. with no success.
I've used test.salesforce.com in the past to upload key messages and set shared files. However, I'm unfamiliar with how that's accomplished using Veeva Vault. I'm certain I'm either naming the files incorrectly, or not entering the key message correctly.
Any assistance is appreciated.
Thanks.
It turns out there were two issues. For some unknown reason, the file didn't post properly. Tech support couldn't determine the reason, but suggesting creating a new shared file - which worked!
Also, in posting the new shared file, I noticed the Distribution Package (zip file) keep "disappearing" in the upload process. So, I just re-attached it (in Veeva Vault - INFORMATION > Renditions).
Oh, and the shared file should be outside of the binder.
To link a shared resource in veeva vault please follow the rules for example
./shared/css/base.css
Shared zip structure should be
shared.zip css
base.css
shared_folder_structure
and you need to add the shared resource to the main file perimeter
parameter
I can't find it in the documentation : Silverstripe-behat-extension
I have a feature file that has some testing scripts. Now I want to fill some test content in a temp database.
So I create a yml file that puts the content in the database.
But how do I load the yml file in my features file?
In your feature use:
Background:
Given a file "/absolute/path/my-data-fixture.yml"
I downloaded the I18n generator package from: http://codex.wordpress.org/I18n_for_WordPress_Developers#Generating_a_POT_file. I want to generate a pot file for my created template now:
php makepot.php /home/mr/workspace/blog/wp-content/themes/myTheme/ de_DE.pot
After executing this command, I get a de_DE.pot with some the WP standard keys in. But my new keys will not be found. But if I add them to the file manually and upload it, they will be translated.
Why doesn't WordPress pick up all my keys?
I have used the poEdit in the following way.
File Menu > New Catalog
Set the language as per your need. Set utf8
Set the paths as . and ..(if you want to place your .mo file at languages folder).
Define the functions from which the strings to take( ie , _, _e, _n, _x, _ex etc).
Now save the file to your template's folder as templateName.po
Now update catalog.
Upon saving the .mo file will be generated in the same folder.
Now rename the .mo file to the specific Locale (for mine bn_BD.mo, for your case de_DE.mo)
I would suggest a few tips from here
I have a script that loads posts automatically from a predefined array and uploads images as featured images from a physical path on a local machine.
When I copy the file into upload directory I use path and filename like so:
$upload_dir['path'].'/'.$new_post_id.$filename
This way if I upload apple.jpg several times, the file will be named 1apple.jpg, 2apple.jpg and so on and it will not be overwritten.
I would however like to use Wordpress native functions that check and rename files. In wordpress uploads if you upload apple.jpg several times it will add a new number before the extension like so: apple1.jpg, apple2.jpg and so on, and the number portion is not based on a post.
I was wondering if you could point me to the function in wordpress that does this check and creates new filename so I can use the wordpress native functions for naming my uploaded files.
You need to filter the function wp_unique_post_slug().
As discussed in WPSE.
I found the answer: wp_unique_filename()
I've createad a rule to transform any file to PDF and copy this one to another folder.
So i can add a file named: "test.rtf" and then the rule create a test.pdf into folder "PDF"..
Till here its ok. If i add a file through alfresco (add content button) it works perfectly...
By the way, on the system that i've developed when i try to add a file then i get my file .rtf correctly in the folder, but the pdf file converted and copied goes without any content...
If i send a rtf file with a table with 10 rows and into the rows i right "testing" then the pdf created goes with the table, and with 10 empty rows...
Someone knows the reason for that?
Im not sure, but maybe when i send the file by the system alfresco starts to convert and copy before completing to create the rtf... someone already got some problem like this one?
The problem you're getting in is that Alfresco first creates an empty file with all the meta-data and then updates the file with the associated content.
So you can do 2 things:
1: create a rule which is triggered on update, instead on create/inbound
2: create a rule which triggers a Javascript file, which will do the transformation and will check on the content size.
Hence it's better to create a rule which checks the content on size.
Create a JavaScript file in Data Dictionary/Scripts.
Check the JavaScript API
Something like this:
if (document != null && document.size > 0){
document.transformDocument("application/rtf");
}