Questions tagged [file]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
68 views

magento2.4 how to upload Pdf file

How we can upload the PDF file in magento2.4 from admin module? We are upload PDF in backed admin its not support magento2.4
0 votes
1 answer
103 views

Magento 2.4 downloading corrupt files always

I am trying to download a file that is located in the /media/attachment/ location. Downloading works with exact file size but never opened. says file format not supported for images, for pdf it says ...
  • 101
0 votes
3 answers
583 views

The directory "/.....public_html/generated/code/Magento" cannot be deleted Warning!rmdir(/.../public_html/generated/code/Magento): Directory not empty

Magento 2.4.2-p1 Smartwave Porto theme extensions from Amasty We have the Smartwave Porto theme. It came with Mageplaza Layered Navigation but an old version. Since we have some problems that I ...
  • 224
0 votes
2 answers
31 views

How to extend this file app/code/Magedelight/SMSNotification/Helper/Data.php in Magento 2

I want to extend app/code/Magedelight/SMSNotification/Helper/Data.php this file in my custom module. I have created a module. My di.xml file app/code/Hl/Smsnotification/etc/di.xml <?xml version=&...
  • 586
1 vote
1 answer
131 views

How to know which file to make changes in Magento 2

I am new in Magento 2 and I m having very difficulty in finding which templates or blocks to make changes. I know how to override files. I had previously made changes in the theme but still, I can't ...
0 votes
2 answers
302 views

How to copy image and paste into product folder using php Magento

I want to copy a file which is in a folder and copy to pub/media/product folder for product image... my current file directory pub/media/xyz/images/i/j/ijk.jpeg . i want this image to product folder. ...
  • 15
1 vote
0 answers
58 views

SQL maxium innodb size issue

I am installing smtp extension suddenly I am facing with below Mysql error message https://prnt.sc/127cedv SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row ...
0 votes
1 answer
98 views

Magento 2 preference not working for Magento\Customer\Model\Metadata\Form\File

I want to create preference for this file Magento\Customer\Model\Metadata\Form\File but its not working so please give some solution for this problem how to solve it di.xml code
  • 3
0 votes
1 answer
128 views

How to install sm_market theme in magento 2.3.6

How to insatll sm_market theme in magento2.3.6. I want to install it manually.
0 votes
0 answers
199 views

How to execute php file from magento admin in Magento 2?

I have created a php file on root folder of magento in Magento 2 and hit a controller on that file. That process is done and i have tested it it running on terminal. How would i run that script from ...
  • 586
1 vote
1 answer
866 views

How to get PDF file URL uploaded in system.xml. Magento 2

I'm trying to upload PDF file via system.xml my code is <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:...
  • 1,466
0 votes
1 answer
762 views

FileLock in Magento 2

I want to create a file locker in Magento 2. If i use the default \Magento\Framework\Lock\LockManagerInterface Magento uses the database to save locks by default. https://devdocs.magento.com/guides/...
0 votes
1 answer
908 views

Delete a file from directory magento 2

Is there any way to delete files from var directory, if the file name matched with a condition. I need to delete log files based upon given date. Please let me know how to achieve this in magento2?
  • 147
0 votes
1 answer
2k views

Magento2 How To Read Data From Excel File

I want to read data from excel file (Not from .csv file but from excel file) . Does anyone know how can i get data from excel file ?
3 votes
0 answers
116 views

Export sessions data from files to REDIS

We are moving from single server to multiple server setup for our store. The problem is that we are using file cache type and we want to preserve those sessions (long expiration, per management ...
1 vote
1 answer
756 views

Magento2: create pdf file option in product details page

I need an option to select the chose upload file (pdf) from admin site and that file will visible and have a download option for users On the product details page on frontend. below is sample images. ...
  • 171
0 votes
1 answer
415 views

Magento 2.3 : "the error evolution"_from entity CustomerId= to index file Undefined

I have a problem with Magento 2.3, when I use X-debug on the checkout part, I have the following exception : Exception has occured. Magento\framework\Exception\NosuchEntityException: No such ...
  • 315
0 votes
1 answer
426 views

Magento 2 Dynamically Add file uploader in system config

How to add a file uploader render in a dynamically added rows? something like: But in dynamically added Like: Let say before or after drop down and the input text field? Best!
0 votes
1 answer
173 views

How to do a dry run in root folder? [closed]

Is there way to do a dry run within your root folder to make sure the line of code works
0 votes
0 answers
107 views

Invalid template file in Magento 2.2.7

1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'MGS_Mmegamenu::active_menu.phtml' in module: '' block's name: 'active.megamenu.script' I'...
  • 1
0 votes
1 answer
898 views

How work with pub/media folder? [closed]

I should get file (image) in magento2/pub/media/vendor_name/.... How can i do this? Thanks
  • 139
0 votes
1 answer
350 views

Magento 2 - Location path of the SQL query file which inserts orders in to database

I want to modify the values of the product items will be inserted to table 'sales_order_item' right before the order is placed. So im trying to locate where the exact query is. Also the order ...
  • 82
0 votes
1 answer
109 views

I want to use php scandir in a phtml

I want to use this in a phtml: <?php $kataloge_dir = '../media/downloads/dlbereich/kataloge/'; $kataloge = array_diff(scandir($kataloge_dir), array('..', '.')); $kataloge_thumb_dir = '../...
  • 165
2 votes
1 answer
1k views

Magento 2.3.1 Download an excel file with PHPSpreadsheet

Trying to create a download button for an Xlsx file. Using PHPSpreadsheet for this however when downloading the file it seems corrupted with a stack trace at the bottom of excel files: Stack trace: #...
  • 5,295
2 votes
0 answers
129 views

files saved from custom options 'file' delete after x days

I have products where the custom option 'file' is selected' all those files are saved in the folder "pub/media/custom_options/quote/x/x" the names are difficult to track: ...
  • 142
2 votes
5 answers
4k views

How to connect SFTP in magento 2

I want to connect the SFTP in Magento 2 here is my code. use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager =...
0 votes
0 answers
136 views

Magento 2 Image in Rss Feed

I want to customise RSS Feed xml. I am using magento 2.2. I want to show image in rss feed. I am not able to trace the file where I can update my code to show the image in RSS xml. Please help me to ...
2 votes
2 answers
2k views

File download not working

<?php namespace Modulename\Merchant\Controller\Adminhtml\Document; class Filedownload extends \Modulename\Merchant\Controller\Adminhtml\Document { protected $_downloader; private $logger; ...
  • 195
1 vote
0 answers
32 views

File permission

Using Linux,centos7,cloud server.having 3 accouts. About file permission, sometime getting warning can't inside the website, need to refresh 2~3 times. How to fix file permission, we don't want every ...
5 votes
1 answer
1k views

Cannot read contents from file.. Warning! file_get_contents Magento 2

I have file type custom option.When i browse any image and add to cart the products then it shows me error. Please check attached screenshot. I have already give the permission. Please help.Your help ...
0 votes
2 answers
1k views

jQuery multiple input types in one form

I got multiple input types in my form based on positions. <input type="file" name="file" id="file" data-positionid="<?php echo $positionId; ?>" class="inputfile" /> Now i want on change ...
1 vote
0 answers
31 views

Virtualmin backups - Strange blank "Files" within backup that cannot be read

I have setup a Virtualmin backup that appears to be working correctly. However, when the backups are attempted to be extracted there is a large amount of errors. WinRAR error below: This appears to ...
  • 21
2 votes
3 answers
649 views

Controller file was loaded but class does not exist in localhost

i am new in magento When i have setup my magento 1.9.0 website in local then after i am facing one error message during check out So can anyone please help me a:5:{i:0;s:51:"Controller file was ...
  • 139
0 votes
1 answer
1k views

Merge JavaScript files is not working correctly

I am having a big problem with Merge Javascript files from Magento under System -> Configuration -> Advanced -> Developer. I need to enable the function to improve the loading of the site, as ...
0 votes
0 answers
24 views

Make a module that allows admins to upload file to web dir, from administration area?

I am new to magento2, and I was put on a task to make a new section, or to somehow allow admins to upload a file from administration area, and save it to web folder, always under same name. File is in ...
  • 193
0 votes
1 answer
189 views

what is the equivalent file of opcheckout.js(which is in magento 1) in magento 2

Magento 1 /var/www/html/xxx/skin/frontend/base/default/js/opcheckout.js Magento 2 What is the equivalent file for above one in Magento 2.
  • 2,468
1 vote
1 answer
2k views

How to programatically find files in a folder

I am creating a cron job for a Magento 2 site. This cron job will search for files in /var/custom_folder/ and will then process them. I already have the cron job setup and can handle processing ...
  • 682
0 votes
1 answer
6k views

How to fix "Cannot send headers; headers already sent" error in magento version 1.9.3.3?

a:5:{i:0;s:147:"Cannot send headers; headers already sent in /home/abc/public_html/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php, line 1";i:1;s:1783:"#0 /home/waterc/...
0 votes
1 answer
312 views

Magento 1 get file size of upload

I want to display the size of the file in MB's using the php filesize option. But for some reason my code does not seem to work, it does not display the file size. The uploaded file is inside the ...
  • 1,522
0 votes
0 answers
180 views

try to change all base images to bigger size images by importing the CSV file, but failed

I used the small size image as the base image before. Now I tried to change all the base images from 250x250 to 800x800 by import the product CSV file. After successfully importing, the small base ...
0 votes
1 answer
124 views

Magento local file location on virtual machine? (Noob alert)

So after installing XAMPP and running magento on it at the end all was very slow so I decided to install a virtual machine that provides bitnami. https://bitnami.com/stack/magento/virtual-machine And ...
1 vote
2 answers
1k views

How to add js file to module and insert it to module layout

I have a module which add layout to admin create order like this: app/design/adminhtml/default/default/layout/mymodule.xml <?xml version="1.0"?> <layout> <...
0 votes
1 answer
25 views

Upgraded after loss many file

PHP7.1 Magento 2.2.0 upgraded to 2.2.1 After my vendor , pub/static/* and theme loss many file and no css How can I do? Please help thank you!
0 votes
1 answer
36 views

*/?> string appearing in text

The string */?> (asterisk slash question-mark greater-than) is appearing in my texts after moving a magento installation over to my own ubuntu server (It previously was on an OVH shared server). ...
0 votes
1 answer
2k views

Session files going over 17GB [duplicate]

Got warning from server regarding Disk space getting full. After checking into file manager I found 17.2 GB of file size in session folder. When looked into var/session folder, I can see unusual ...
1 vote
1 answer
495 views

Why magento automatically generate different file size images in cache folder?

I have a website builder with Magento 1.9.3.4, and I used a paid template package on the site, the package has 5 themes, my site only used the default theme and I found my server disk space was ...
  • 11
1 vote
3 answers
3k views

How to create json file in magento 2

I need to create a json file with data and store that file in specific directory of magento 2. Can any one please tell me how we can achieve this in magento2 in standard way like file system. Please ...
1 vote
1 answer
536 views

Fail to import large file on Magento 2 from admin

I succeeded importing a csv file size 319KB with 357 products. But failed to import a csv file size 571KB with only 349 products. Please help me to fix the problem.
2 votes
3 answers
3k views

The use of function pathinfo() is discouraged Magento 2

I am checking uploaded file extension by pathinfo() function of php but in coding standard check it's shows The use of function pathinfo() is discouraged My code: $fileExt = pathinfo($file, ...
  • 729
8 votes
2 answers
7k views

Generate xml file programmatically

I need to generate an .xml file from my extension. Inside Namespace/Module/view/adminhtml/ui_component/ folder, I need to do this pro-grammatically because the .xml file will be generated based on ...