Questions tagged [assets]

Files managed by Craft, stored in physical folders or (with Craft Pro) on Amazon S3, Rackspace Cloud, and Google Cloud.

Filter by
Sorted by
Tagged with
1
vote
1answer
34 views

Use Service Worker in Plugin

I am currently working on a plugin that uses a service worker which gets registered on the front-end by some javascript code and the problem is that the service worker scope is restricted to /...
0
votes
0answers
20 views

AWS Serialisation error on front end

Getting the following error on a site I'm developing: Instances of craft\awss3\S3Client cannot be serialized Unsure if this is an issue with the Amazon S3 plugin or at my bucket's end. Any ideas ...
2
votes
1answer
43 views

Error on upload: “Impossible to create the root directory…”

In Craft 3.2.10, I'm getting this error message when I try to upload an image asset: Upload failed. The error message was: “Impossible to create the root directory "/Users/me/Work/Client/repo/web/...
2
votes
1answer
19 views

What is “Temp Uploads Location” in Craft 3.2.10

In Craft (Solo) 3.2.10, In Settings > Assets > Asset Settings, there's a field called "Temp Uploads Location". I do see images in mine that I intended to go into the system, but not into there. What ...
1
vote
1answer
36 views

How do I set up Craft 3 to web server in WAMP?

I'm very new to Craft CMS, and I certainly love this concept! However, I keep trying to run it locally onto my computer following the documentation here https://docs.craftcms.com/v3/installation.html ...
1
vote
1answer
28 views

When to create a new asset volume?

I'm not sure if I've been using asset volumes correctly. For each folder inside my /uploads directory, I've been creating a new volume. So they're all relative to /uploads I have volumes for things ...
1
vote
1answer
16 views

What purpose does the site-selector under assets fulfill?

I'm kind of confused about the site selector under Assets, because from what I can gather it actually doesn't do anything? See this screenshot, top left: I was first under the impression that I would ...
0
votes
0answers
12 views

Default sorting in Assets view

Is there a way to change default sorting order on asset view pages? At the moment the default one is Upload Date and selecting sorting by Title only affects view in the folder you're currently in. In ...
1
vote
1answer
22 views

Multiple Images/Assets from Super Table?

I have a Super Table "previewImage" with a field "previewImageFile". This does not work: <ul class="col-lg-12"> {% for subsection in entry.descendants.descendantDist(1).all() %} <...
1
vote
1answer
28 views

Get an Asset's Filename Without the Extension

How do I get an asset's filename without the extension? So if my filename is my_cool_photo.jpg I want to return my_cool_photo. Using {{ entry.assetsField.one.filename }} returns the name of the file ...
0
votes
0answers
17 views

Update asset index by PHP in Craft 3

In my plugin, I need to update asset indexes because it makes new asset folders. I found this question, but the answer is for Craft 2. How do you programmatically update an asset index? It does not ...
1
vote
1answer
28 views

Craft criteria for asset folders

In my plugin, I would like to search a folder. However, I cannot find any information about the criteria for folders. Are there any documentation or something? $n = Craft::$app->assets->...
0
votes
1answer
27 views

Assets in Super Table not working

I have a assets field in a Super Table. But the output from the image i selected in the Entry is just garbage: O:28:"craft\elements\db\AssetQuery":82:{s:8:"volumeId";N;s:8:"folderId";N;s:8:"filename";...
1
vote
1answer
109 views

Upload failed, fopen – failed to open stream: Permission denied

When trying to add assets in the live admin I get the following error: Upload failed. The error message was: “fopen(assets/images/general/IMG-2483_190715_161352.jpeg): failed to open stream: ...
1
vote
1answer
72 views

How to place assets in plain text fields?

In ExpressionEngine i had a matrix field for images (assets) that i used in my entries. I was using NSM Transplant and in my entries i could use {bild-1}, {bild-2} and so on wherever i wanted a image ...
1
vote
2answers
28 views

Updating Asset Indexes Fails with TemplatesController Not Found Error in Craft Logs

Client wants to be able to upload a 90MB .mp4 file to a local asset folder, that understandably throws a 'General error: 2006 MySQL server has gone away'. I uploaded the file directly to the server ...
0
votes
0answers
29 views

Download asset from a form

A few months ago, I developed a form to download asset. The form helps to download files from entry page or user profile page, as this question. Is it possible to have secure (private) assets? ...
0
votes
0answers
24 views

Can Feed Me search multiple asset volumes when importing entries?

I've manually copied and indexed assets from a previous CMS. I have an asset field with multiple selected sources. However, when importing entries with the assets field Feed Me only finds the file if ...
0
votes
0answers
12 views

How would override a single CP template?

I would like to override the "_special/image_editor.html" template, to allow more constraint possibilities. How would override this template ? Nicolas
0
votes
0answers
15 views

How can I upload assets assigned to a specific site?

I have 2 sites, site A and site B. When I upload an asset to site A, the asset is also visible in site B. How can I upload an image to only site A or site B? I am looking for a similar behavior like ...
1
vote
2answers
73 views

Rename Assets when it is uploaded

I would like to rename new assets by PHP, but somehow it does not work. In Craft 3, I suppose it is like; Event::on(\craft\services\Elements::class, \craft\services\Elements::EVENT_AFTER_SAVE_ELEMENT,...
2
votes
1answer
67 views

Asset Volume using Environment Variable on File System Path as literal string on upload

I have a volume called "Website" with a File System Path that uses an environment variable, $ASSET_ADHOC_PATH. The variable has been setup in my .env file as follows: ASSET_ADHOC_PATH="/home/theadhoc/...
0
votes
0answers
13 views

Entries are being saved even when I try to upload files with the wrong extension

My Image service function throws an exception and sends it to the Craft logger that the extension is invalid. But my entry is being saved even though the field is set to only allow images. I am ...
1
vote
1answer
31 views

Asset Filename Query using Product SKU

I'm moving an e-commerce site over from EE. Many of the products have a "product image". Many do not, but we have an assets directory full of images that match their SKUs. When listing the products ...
1
vote
1answer
44 views

How to restrict uploads to currently edited site

I've tried /{{currentSite.handle}}/ but this uses current site handle, not the site I'm currently editing. Is there a way to dynamically set folder to currently edited site?
1
vote
1answer
208 views

How to do CSS/JS bundles/minifying in Craft 3

I would like to combine all of my sites JS-files into one bundle - and perhaps also obfuscate it. Same goes for CSS-files. How would I do that in Craft CMS 3?
1
vote
1answer
20 views

Uploaded Assets always get 600 File Permission and are therefore not displayed (403 Error)

After a fresh manual Craft CMS install everything runs fine, except uploading Assets. Well, the uploading part works fine but uploaded assets always just get file permissions of 600 (adfrw) Group and ...
0
votes
0answers
21 views

Rename files uploaded to certain sources in Craft 3

I have an event written for Craft 2 which renames files, which are uploaded to certain sources, to have a 35 character random string, plus its original extension. I am looking to update this for ...
1
vote
1answer
13 views

some assets have volumeId set to NULL in database

I noticed that some of my assets have volemeId column set to NULL in the database table assets. Is it normal? Should I attach them manually to some volume?
2
votes
1answer
25 views

Plugin that lets user select focal point/cropped area

I would like to let the editor of a specific entry select the focal point and cropped area each time she selects an asset for an asset field. How can I achieve that? I know about the built in ...
1
vote
0answers
42 views

How do I correctly upload a new Asset from a temp file I generated from a service method?

Preamble Craft 3.1.26 PHP 7.2.8 on Mamp Pro 5.1.1 I browsed to my storage/reports folder and made sure in Finder than full read/write privileges are granted. What's goin on I have a module with a ...
0
votes
0answers
37 views

Asset subfolder dynamic condition

I have a channel called Locations. I've created a matrix field to hold x amount of team members. I have the asset folder for the team member's picture saved to locations/{owner.slug}/team I would ...
0
votes
1answer
49 views

An unknown error has occurred in asset reindex

I am getting the error: An unknown error occurred for each file in a folder when I try Update Asset Indexes. The folder is a local folder that is outside of webroot. The files just contain json data....
2
votes
1answer
56 views

Multi-site - Setup remote asset volume to store assets on a per site/folder basis

We've got a Craft 3 (3.1.25) multi-site setup with three sites: Corporate (default) Brand A (brandA) Brand B (brandB) For this install there's 3 users setup with the following access to the sites. ...
0
votes
0answers
37 views

When trying to create a new asset volume, I don't have the form line where to put the path

As per the question, see the included screenshot: I just don't have the URL form to type where the volume should be on the server.
1
vote
1answer
71 views

Assets Error: Unknown or bad format (years) at position 0 (y)

I am getting a new error, after no apparent updates from me or the client. The error only appears on pages with this one particular field. "DateInterval::createFromDateString(): Unknown or bad ...
1
vote
1answer
44 views

Error creating new volume

When creating a new volume (same process as the other 3 volume I currently have and which are fine, I'm running into the following error). Any help would be appreciated.
2
votes
0answers
107 views

How to download private assets (without public URL) from dashboard

I would like to download asset files from Craft 3 dashboard. Those files are out of web folder because of security reason. I made "documents" folder just under the root of the project, and the files ...
0
votes
0answers
57 views

Assets uploaded image quality is terrible

When I upload a JPG image through Assets, the image quality is terrible. I dont mean a slight difference for web optimisation, but I mean REALLY bad! See screenshot. Can't find any helpful about ...
1
vote
0answers
19 views

Asset field - saving assets with dynamic subfolder by categories not working consistently

I have two asset (image) fields in project entry type, both with the same setting and with different outputs… Anyone knows why? Thanks My fields are: intro image field gallery image field Both ...
1
vote
1answer
27 views

Advice on entry form file uploads and S3

Just planning out an entry form that includes a file upload field – an assets field hooked up to an S3 bucket. I see some documentation on entry form assets here, but need some advice on getting this ...
1
vote
1answer
46 views

Craft “Embedded Assets” Plug-in didn't save Embed in selected Asset Volume in CP

i have 3 asset volumes in my craft install (3.1.5). If i want to create an embedded asset(Embedded Assets Plugin 1.0.2) in the first volume (CP) in my volume List than it appears in the second. Every ...
2
votes
0answers
93 views

Move an asset to another volume with volume specific OptimizedImages Field and on the entry a volume restricted Asset Field

I have three volumes: content, hero and overview. Each volume has his specific OptimizedImages Field(s). Asset Fields are restricted to its specific source volume. For example: A Super Table Field ...
1
vote
1answer
55 views

Restricting file size for an Assets Volume

I have a use case where I want to limit the allowed file size for a certain Assets Volume to 20kb. All other volumes should be allowed files no matter the size. I have looked at some other threads ...
1
vote
2answers
25 views

Merging Assets Fields

I've got this working but it seems terribly verbose to do something, that in my opinion should be easier. Is there a better way to get the assets from 2 different fields, merge them and output them ...
1
vote
1answer
61 views

Assets are not loading anymore (maybe an update)

I just noticed that I can't see my files if I go into the assets section. An Error blinks up and says "An unknown error occurred". In the front-end, I see every file and I can upload files to an asset ...
1
vote
1answer
29 views

Is there a way to reset the focal point in Craft?

As the question states. Is it possible to reset the focal point in the CMS? I cannot see any obvious setting? If not could this perhaps be a feature request for a reset focal point button?
0
votes
0answers
119 views

Broken Asset Previews/Transforms

The asset previews in my CP are displaying as broken, and certain image transforms on the front-end template are broken. If I preview a file in the Assets panel it displays fine, so it seems to be a ...
1
vote
0answers
34 views

Image Store Issue

Dear Craft Users/Developers We have inherited a customer on our server platform using CraftCMS 2.7.4. They had their site before moving to us hosted with images using Rackspace via the CraftCMS Pro ...
1
vote
1answer
77 views

Craft 3 - Moving assets between folders causes apache connection to max out

In Craft 3, I keep running into an issue when I try to move a large amount of files (around 200) by dragging and dropping from my “Holding” folder into a “Live” folder using Craft Assets section. Both ...