Upload File with nest fastify multer "Unsupported Media Type" - nest

Im trying to import a file using nest fastify multer but im receiving:
I dont know how to solve it
the controller:
theoretically, everything is already set up, if you need more prints I can edit the question
Can u guys please help me?
Ive tried to instal fastify-multpart and config but idk how to do it yet, all i wanna is read the csv file

Related

Google Colab - Not able to import API key file

I have a code in Google Colab which uses a Python package called Atlite, which in turn retrieves data from the Climate Data Store (CDS) through the use of an API key.
When running this code in Python I just need to have the file containing the key saved in a specific folder and then the code runs perfectly fine.
When I try to run the code in Google Colab the following error arises:
**Exception: Missing/incomplete configuration file: /root/.cdsapirc
**
I have the file ".cdsapirc" in my computer but when I try to import it to the "/root" folder in Google Colab it just does not get imported. I can import a .py file, but when I try to import the ".cdsapirc" file (which is basically a txt file) it does not work.
Could someone please help me to solve this issue?
Thank you!
Regards,
Sebastian
If uploading the .cdsapirc file doesn't work, you could try creating it inside Google Colab using a simple Python script:
uid = "<your uid>"
apikey = "<your api-key"
with open("/root/.cdsapirc", "w") as f:
print("url: https://cds.climate.copernicus.eu/api/v2", file=f)
print(f"key: {uid}:{apikey}", file=f)
You can get the uid and apikey either from CDS after logging in or you open you local .cdsapirc file and look them up there, see here for more information.
There might be a nicer solution by someone more familiar with Google Colab though.

feature file is not running in karate framewrok in intellij

I'm new in Karate framework.
And i have create one script which is read the request body from "user.json" file and i have configerd that in feature file. till that it's good but when run feature file, it's giving me an below error:
json file:
and i tried to found solution for this but didn't get much result for same.
can anyone please help me out for how to reslove this?

Missing cli.json file when creating a new Vue project using Amplify

Missing cli.json file when creating a new Vue project using Amplify. I am following the official tutorial
I get as far as Initialize a new backend and run amplify init:
Initializing finishes with the following (it does not matter whether I answer yes or no to the share information on failure message):
And here's the file structure:
I also notice that the aws-exports.js file was not created. Oddly enough, the aws-exports.js file is listed in the .gitignore file.
I have tried a few times to create a new project, in VS and in the windows console. I have also tried creating the Vue app using Vue 2 and 3 and come up against the same issue.
In my final attempt, I came across the same issue but proceeded to "successfully" add the graphQl API but this error was displayed when I ran amplify push to update the backend:
An error occurred during the push operation: /
The AWS Access Key Id you provided does not exist in our records
I presume this is because the aws-exports.js file that contains the access key does not exist?
I'd appreciate any help in sorting this out.
thanks
solved!
I mistakenly created the project within another project.

Can't import PDF with mpdf

everyone.
I started using mpdf on my website recently. Creating new pdfs is working fine, but i can't import existing ones. I get this error whenever i try to execute the import:
mPDF error: Cannot open ../folder1/folder2/folder3/folder4/folder5/thisisthepdf.pdf !
(that is not the real path)
I included the mpdf in the php. The folder and the files are on chmod 777 and the pdfs are all version 1.4
This is the way i am trying to import.
$mpdf=new mPDF();
$mpdf->SetImportUse();
$pagecount = $mpdf->SetSourceFile('../folder1/folder2/folder3/folder4/folder5/thisisthepdf.pdf');
$tplId = $mpdf->ImportPage($pagecount);
$mpdf->UseTemplate($tplId);
$mpdf->WriteHTML('Hallo World');
$mpdf->Output();
I tried various ways to import i found on stackoverflow and other sites, but nothing worked. Not even the code from the official mpdf manual i am using (the one above) is working.
Trying to solve this issue for quite a while now, but i am out of ideas. I Hope someone can help me. Thanks in advance!
This error message is raised because of a failing call of a simple fopen(). Which means that the PHP script simply cannot access the file.
So ensure that the path is valid by e.g. passing it to realpath(), as it seems to be a relative path. If this evaluates to false the path is simply wrong. Otherwise it is a permission issue.

Can download but file will not unzip as expected

I'm attempting to access the Geometadb database which first involves download of the SQL library. I did that and then I got the Geometadb library.
library(GEOmetadb)
Next I need the Geometadb file which is where things start to go wrong. I issue this command as seen exactly in the tutorial: https://bioconductor.riken.jp/packages/3.0/bioc/vignettes/GEOmetadb/inst/doc/GEOmetadb.html
if(!file.exists('GEOmetadb.sqlite')) getSQLiteFile()
It should proceed to not only download a .gz zip file but also unzip the file. It downloads it but never unzips it. Instead I get the following error.
trying URL 'http://dl.dropbox.com/u/51653511/GEOmetadb.sqlite.gz'
Error in download.file(url_geo, destfile = localfile, mode = "wb") :
cannot open URL 'http://dl.dropbox.com/u/51653511/GEOmetadb.sqlite.gz'
In addition: Warning message:
In url(url_geo_2, open = "rb") :
cannot open: HTTP status was '403 Forbidden'
Just not sure what's going on here. Considering these are just the early tutorial steps I'm probably missing something really obvious but I'm hoping someone can help me out. Thanks!