Forum
Asset upload script error
Hi there,
I'm working on a new build and I have a template where a user uploads a banner image to a bucket named 'banners'. See below:
<div class="page-Banner" style="background-image: url(<perch:content id="banner" type="image" width="2000" height="1182" bucket="banners" crop="true" />);">
<div class="page-Banner_Text">
<div>
<h1><perch:content id="banner_title" type="text" label="Banner title text" help="This is the heading for the banner" /></h1>
<perch:content id="banner_text" type="textarea" size="m" label="Banner sub text" help="Keep this short." />
</div>
</div>
</div>
When I try and select any of my assets to upload nothing happens - I select the file, click 'open' and it never appears. If I look in the console I can see a javascript error of:
This file can't be queued because it has already been processed or was rejected.
I've never had this before, any ideas?
Update: I've carried on building around this and I am finding this issue with any image field I use.
Has the role been given permission to upload to that bucket?
Hi Drew, sorry for seriously late reply to this...
Where would I go to ensure the user has permissions? It's the main primary user for this account so I didn't think it needed any additional configuration. Is this something new in recent versions?
Yes, it's new. There are bucket permissions for each role under the role settings.
Oh really, i can't see anything. Does the bucket need creating manually beforehand?
There's no Buckets tab on the smart bar when editing a role?
I'm not seeing anything appearing regarding buckets within the role section, anywhere.
Can you post your diagnostics report?
Sure:
Does
banners
exist as a bucket currently?It does not. I've never had any assets successfully getting any asset to go to this bucket in order for it to be created. If I go into my assets now, I can see only the default bucket.
Are you able to upload to the default bucket?
Yes, I just gave it a go, and the default does work
Ok, great. Does defining your bucket in the
buckets.php
file also work?Hi Drew,
Yep defining banners in the bucket config creates it correctly. Would that point to a bug somewhere preventing it automatically creating the bucket for me?
Of course. We'll look at it.
For anyone experiencing the same issue, it was a bug in Perch 3.0.9 and was fixes in 3.0.10