Cypress upload file - cypress-file-upload error on huge file - cypress

Hello I am trying to upload a 10MB file using Cypress last version and this package:
cypress-file-upload
this is the line that doesn't work:
cy.get('[data-cy]="...."').attachFile(fileToAttach);
By the way, If the file is small works fine, but if the file is more than 5MB doesn't work.
I don't have any Cypress error, but the file has not been uploaded, seems the form reject the file.
i tried already to put cy.wait() but still doesn't work.
any idea?
thanks in advance
Andrea.

Related

storing a file to a symlink in laravel 9

I'm trying to get an image from the web and store it locally in my 'app/library' folder using Laravel 9. After battling for an hour with get_file_contents, I finally discovered guzzler and the file is fetched properly. Now I'm trying to save it using the following command.
$stored = Storage::put(storage_path('app/library').'/'.$filename, $content)'
$stored shows as '1', which leads me to think that it's worked, but the file is not in my app/library folder. Nor can I find any file with the correct name anywhere in my project.
Is there something wrong with my command?
Run the storage:link command.
See https://laravel.com/docs/9.x/filesystem#the-public-disk
Thanks to lagbox for the answer. I was overthinking it and didn't need 'storage_path()'. The following worked.
$stored = Storage::put('library/'.$filename, $content)'

File Manager for TinyMCE 5 Not showing uploaded images,404 image not found,but it exists in the folder - Laravel

So,i've been having problems with integrating file manager to TinyMCE 5,uploading images into a specified folder using the file manager works without any issues,that is also true for deleting the images,but the problem is when you try to use the images,they appear as blank and if you open a console you will see error 404 messages that images don't exist
The solution that worked for me is that i went to .env file which is inside of your laravel project and then changed this line of code which is usually located in the first few lines of the file:
APP_URL=http://localhost
to this
APP_URL=http://127.0.0.1:8000
It seems like file manager uses APP_URL to build the URL for some reason,still haven't found out why tho

Laravel pdf issue: failed to open stream: No such file or directory by using barryvdh/laravel-dompdf package

I am update composer and use barryvdh/laravel-dompdf package.
the problem is when i click the button it show me error like image below:-
Is that anyway to change the folder path? or am I missing code to modify path to download the pdf file?
You need to run this command:
php artisan vendor:publish
Then, try to create a fonts directory in the storage directory.
i.e. storage/app/fonts. Also, remember to make it writable.
For maximum execution time of 30 seconds exceeded, this is not laravel related issue but it's about php configuration issue. Please see this and fix it: http://php.net/manual/en/info.configuration.php#ini.max-execution-time
You can also see this answer: https://stackoverflow.com/a/30290770/6000629
Hope this will helps you!
Try this:
$pdf = PDF::loadView('pdf/personalpdf', compact('user','result'))->setOptions(['defaultFont' => 'sans-serif']);
It worked for me, I didn't make any file/folder
Just remove the reference to css external file in your cart.placeOrder.blade
Note: This directory must exist and be writable by the webserver process.
under the config file thats what it say: therefore you should create the fonts directory inside the storage.
"font_cache" => storage_path('fonts/'),

Creating PDF in Codeigniter with Dompdf

I am Using DomPDF for developing pdf in Codegniter GIving Error
require_once(): Failed opening required 'C:/xampp/htdocs/manisha/application/helpers/dompdf/lib/php-font-lib/classes/Font.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\manisha\application\helpers\dompdf\dompdf_config.inc.php on line 332
It seems your include fails. Please check the file permissions and if the "Font.php" file is actually at:
C:/xampp/htdocs/manisha/application/helpers/dompdf/lib/php-font-lib/classes/Font.php
Also, check if it works when you change "require_once()" into "require()", if so, you probably trying to include that file multiple times.

Artisan packages error

I'm having some trouble with artisan/packages.. I've added a package to my composer file and ran composer update and an error was returned:
PHP Warning: require(/home/xxx/public_html/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/xxx/public_html/artisan on line 16
I can see that require path is incorrect, my structure is like so:
/home/xxx/bootstrap
/home/xxx/app
/home/xxx/vendor
/home/xxx/public_html
I hadn't changed any of the paths and everything seemed to work out of the box with this structure, basically removing the public folder and pushing everything up a directory.
I've opened up Artisan tried a couple of paths that kept failing so i've changed them to absolute:
require '/home/xxx/bootstrap/autoload.php';
It seemed to work from here on, but at the end of the process got another error:
Writing lock file
Generating autoload files
[RuntimeException]
Could not scan for classes inside "app/commands" which does not appear to be a file n or a folder
Rather than continue to mess it up i thought now would be a good time to clear it up, any ideas how to fix this?
Make sure you are using php 5.3 or higher.
Run php -v
Try creating an empty "app/commands" folder, fixed the issue for me!

Resources