Questions tagged [upload]

The tag has no usage guidance.

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

Upload Image in Craft CMS on Server

When I upload image in server I get : stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given
0 votes
0 answers
112 views

How to upload file via GraphQL

I am unable to find any information about how to upload a file via GraphQL. Any help would be appreciated. This is my mutation at the moment. mutation saveContactForm($slug: String, $title: String, $...
1 vote
1 answer
47 views

Images uploading corrupt

Can anyone suggest why my images are uploading either blank (PNGs) or look like static (JPGS)? Example here - https://cookproperty.co.nz/admin/resources/assetthumbs/904/200?d=1636447193 I don't ...
  • 29
1 vote
1 answer
168 views

Link uploaded file to an entry field

I want a user to upload a PDF file to his request. On the backend, I can manage to save the file on server, but I'm looking for a way to save it in the Entry just as if I was doing it manually on the ...
1 vote
1 answer
94 views

Upload file issue on Craft 2.9.2

This issue is occurring on Craft 2.9.2. The assets are stored on Amazon AWS (S3). When I try to uploaded a new asset (of any size, even very small), the progress bar moves to 100% position but remains ...
1 vote
1 answer
89 views

Front end member uploader

Hi I'm fairly new still to CraftCMS. I built one website with it a few years ago and have tinkered with it ever since and I do like it a lot. What I've been asked to do is create a website directory ...
  • 309
1 vote
1 answer
68 views

Set asset uploader from frontend entry form

Now that Craft keeps track of which user uploaded an asset, I'm wondering if it's possible to set this information when an asset is uploaded via a frontend entry form. I have a form that includes an ...
  • 417
1 vote
1 answer
27 views

CP assets uploads are reverse ordered after upload

Problem CP assets uploads are reverse ordered after upload. Description I have a folder with 5 images: 1.jpg 2.jpg 3.jpg 4.jpg 5.jpg I want to upload these images in the Craft CP. I have an Asset ...
  • 125
2 votes
1 answer
127 views

Uploading Assets - PNG changed from 72 dpi to 96

I've seen a couple strange things that Craft does when uploading images (like upsizing jpgs). The most recent, every time I upload a .png file it changes it's DPI from 72 to 96 for some unknown reason ...
  • 61
4 votes
0 answers
586 views

How to Upload Multiple Assets Using Frontend Form

I'm trying to create a more interactive experience to upload moultiple images on a frontend entry form. Things I have done: I have implemented the code here: https://docs.craftcms.com/v3/dev/...
  • 397
0 votes
0 answers
83 views

Using Solspace Freeform to create an entry including a file upload

I have recently been having some issues using the Solspace plugin FreeForm. I have created a front end entry form which, when submitted, creates an entry in a specified section in the CP. I have used ...
  • 245
0 votes
0 answers
56 views

Craft CMS security scans: upload of over-the-limit file hangs the system; should it throw exception/error?

We are putting our new Craft CMS 3.2 install (dev environment) through some security scan paces, including uploads of 500Mb files. We'd expect to throw an exception message/error page on an over-the-...
2 votes
1 answer
146 views

Scan of front end user uploads

I wonder if we have a form allowing file uploads for front end users, does Craft or its plugins have certain feature to scan for virus / malicious content, before saving it? If not, what would be the ...
  • 439
3 votes
2 answers
2k 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
2 answers
475 views

Laravel Forge not honoring Craft 3 maxUploadFileSize config setting

I have a Craft 3 site deployed to a Digital Ocean droplet via Laravel Forge. I have the maxUploadFileSize set to 256B (268435456 in bytes) in my config/general.php like so: <?php return [ // ...
1 vote
2 answers
381 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 ...
1 vote
1 answer
82 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?
  • 565
1 vote
1 answer
83 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 ...
  • 393
1 vote
0 answers
543 views

Upload Error: 403 Forbidden response with DigitalOcean

This is the error I get when uploading files through the front end and Craft admin into a docs folder on my DigitalOcean s3 instance (bucket name is changed to test). Error executing "ListObjects" on ...
  • 1,107
0 votes
0 answers
331 views

Large file upload, 500 server error

We've a Craft 3 site hosted with Digital Ocean (Serverpilot set-up) with the DNS routed through Cloudflare. The client has experienced issues uploading large ZIP files to (c140MB), returning a 413 ...
  • 1,741
4 votes
3 answers
642 views

How to rename filename of asset before (or after) upload in Craft 3

I want to change the filename before the file is stored, to prevent ugly, long and weird filenames uploaded by users. I've found an example for Craft 2, but because of the changes for events I can't ...
  • 141
1 vote
1 answer
181 views

Is there any way to replace the asset programatically?

In the CP, when we upload an image with a same name, craft will ask if we wanna keep both or replace. So in plugin, is there any way to do the replace?
  • 397
1 vote
2 answers
2k views

Adjusting Max File Size - Stuck at 16M After Adjusting general.php

I'm adjusting the maxUploadFileSize in Craft, to 50MB. In following the post below, I made several adjustments to both: php.ini and craft/config/general.php. https://stackoverflow.com/questions/...
  • 380
1 vote
1 answer
285 views

Uploaded images are saving to the server's temp folder and throwing 500 errors

I've got a wordpress site that is live and am building a craft site to replace it on a subdomain and am having a strange issue that I've never had with any other craft sites I've built. Sometimes when ...
  • 35
1 vote
1 answer
59 views

Prevent foreign characters in filenames?

It seems that some of our users are uploading filenames with foreign characters... Is there any way to prevent this? I'd like to keep the filenames to all English letters (plus numbers, dash & ...
  • 23.8k
0 votes
1 answer
168 views

Serialization of 'Closure' is not allowed when upload image [duplicate]

I built up a form at the frontend to allow users to upload their avatars,my code looks like below <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} ...
  • 397
0 votes
1 answer
466 views

Serialization of 'Closure' is not allowed

I created a form on the frontend that allows users to upload their profile photos: <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> {{ csrfInput() }} <input ...
  • 397
1 vote
1 answer
221 views

Default Upload Location needs matrix field and entry info... How?

I have a towns entry with a matrix field: townAlbums. This matrix field has just one block type: photoAlbum. This one block type has two basic text fields (the important one being albumName and one ...
1 vote
2 answers
230 views

Dynamic asset subfolder path for Craft Commerce

I have a asset field where I would like to save the images in dynamic folders. The upload folder should be parsed for the Dropdown field values in a Matrix field. For a normal Dropdown field it works ...
  • 213
2 votes
1 answer
1k views

Craft 3: Upload user photo from front end

How do I allow logged in users to change their user photo on the front end in Craft 3? I am creating an "Edit Profile" page and I followed the answer to this question for Craft 2 to create a form ...
1 vote
1 answer
268 views

Overriding native CP template (without hacking the core)

Is it possible to create a plugin that overrides a control panel template, and still be able to update Craft normally? What I'd like to achieve: I have a custom field with information on every asset ...
  • 11
1 vote
1 answer
1k views

How can I insert images into a Redactor rich text field in a front-end form?

I want to allow registered users to insert (i.e. upload) images into a Redactor rich text field in a front-end form. I dowloaded the Image Manager plugin from Imperavi (https://imperavi.com/redactor/...
2 votes
1 answer
544 views

Rotate image according to EXIF orientation not working from a plugin

I am using a front-end form to upload images and store them as assets on an amazon S3 bucket. My server has imagick installed an uses it and in my config I have "rotateImagesOnUploadByExifData" set ...
  • 35
0 votes
0 answers
347 views

Uploading Assets - Problems

I've got a number of assets directories set up. One of them is having an issue where if you upload an image it doesn't appear in the control panel despite having been uploaded to the server. I checked ...
  • 1,919
1 vote
2 answers
554 views

Clearing temporary assets from craft/storage/runtime

After some unsuccessful uploads I ended up with a lot of loose files in craft/storage/runtime/assets/tempuploads They show up in the asset list when selecting assets for new entry. How do I remove ...
  • 393
2 votes
1 answer
874 views

8MB memory limit on asset uploads?

I'm trying to upload a 40MB video through the assets tab in the admin panel, but I get an error saying "The file "x.mp4" could not be uploaded, because it exceeds the maximum upload size of 8.0 MB." ...
  • 35
2 votes
0 answers
436 views

Temp folder and file upload permissions issue

Using Sprout Forms Plugin, and following the front end file uploads example, I'm trying to use the famous jQuery File Upload plugin to deal with batch of large files and get upload progression. This ...
1 vote
0 answers
158 views

Front end asset uploads not correctly rotated

Running into an issue whereby front end asset uploads are not the correct orientation. I've spotted this mostly with user profile pics. What's the best way to start debugging this? My server has ...
  • 438
1 vote
1 answer
46 views

Upload assets to location based on category if entry isn't saved yet?

I'm building a gallery system and on the entry page I have fields for gallery category (category field) as well as gallery photos (assets field). When creating this entry, I would like to upload the ...
  • 11
5 votes
2 answers
4k views

Upload file size limits to 256MB

I have run into a problem of file sizes maxing out on 256MB. On PHP side I have upload_max_filesize & post_max_size set to 1GB I've created a simple PHP script to test upload size and managed to ...
  • 565
1 vote
1 answer
162 views

Copy uploaded image in event assets.onSaveAsset

Is there a way to copy an uploaded image in the assets.onSaveAsset event? I want to make a copy of the original uploaded image (for internal purposes) and after that I want to add a copyright text on ...
  • 213
2 votes
1 answer
297 views

Asset upload fails with progress bar at full, but images in tempuploads folder

I can’t for the life of me get images to upload. Neither on my local server or on the live server. The progress bar goes to the end, and then … nothing. From what I can see online, I’m not the only ...
  • 849
1 vote
0 answers
216 views

Frontend upload asset to Matrix

I created a matrix with 1 type, 3 fields for user profile. I use front-end to upload file to documentUpload field. But I got PHP warning: array_merge(): Argument #1 is not an array message. I Google ...
0 votes
1 answer
113 views

Uploading PDFs with Imagick extension enabled seems to rasterize and compress the PDFs

Uploading PDFs to Craft3 with Imagick extension enabled seems to rasterize and compress the PDFs. Also, if I manually swap out the files after upload, it works fine until I have to edit something in ...
  • 63
2 votes
1 answer
168 views

Non-admins not authorized to create entry via frontend

I'm currently working on a page that should allow registered users to upload an image and save it as an entry in a section called "bildupload", together with some additional fields. Creating/saving ...
2 votes
1 answer
91 views

PNG-8 upload to S3 hangs

We're having trouble uploading PNG-8s. PNG-24s and JPGs work fine, but after selecting a PNG-8 to upload, the progress bar appears and fills to max in a couple of seconds, but then hangs indefinitely. ...
6 votes
0 answers
307 views

Solspace Freeform Upload file dynamic location and duplicate file avoidance

Using Freeform for forms which have multiple file upload fields. Is it possible to have a unique asset directory for each submission? For example: uploads/maindirectory/submission.id/ I'm trying to ...
  • 671
1 vote
1 answer
113 views

Use REQUEST variable as dynamic upload location

How can I use a request variable used in an upload form like this? <form method="post" accept-charset="UTF-8" enctype="multipart/form-data"> <input type="hidden" name="action" value="entries/...
  • 213
1 vote
2 answers
475 views

Issue with uploading files from frontend

I'm currently trying to implement a simple file-upload form with CraftCMS. However, even though there are no errors on submitting the form, no file actually seems to get uploaded. This is the form: ...
2 votes
1 answer
188 views

User make assets subfolder in the frontend

I have a standard user profile form. But now I would like that the user can upload images in new subfolder and make own subfolder. Is there any solution or a plugin for this?