Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 699

Pdf is available in console but unable to see network tab

$
0
0
import { axiosInstances } from "./axiosInstanc"interface upladPdfPayload {    name: string;    pdf: File}export const uploadPdfApi = async (payload: upladPdfPayload) => {    try {        console.log(payload);        const res = await axiosInstances.post('/pdf/upload', payload);        return res.data;    } catch (error: any) {        return error.response.data;    }}

value in consolename: 'Resarch paper certificate.pdf', pdf: File}name: "Resarch paper certificate.pdf"pdf: FilelastModified: 1713083292691lastModifiedDate: Sun Apr 14 2024 13:58:12 GMT+0530 (India Standard Time) {}name: "Resarch paper certificate.pdf"size: 937460type: "application/pdf"webkitRelativePath: ""[[Prototype]]: File[[Prototype]]: Object

axiosInstance

import axios from "axios";import { baseUrl } from "./baseUrl";function getToken() {    return localStorage.getItem("token");}export const axiosInstances = axios.create({    baseURL: baseUrl,    headers: {        authorization: `Bearer ${getToken()}`    }})axiosInstances.interceptors.request.use((config) => {    config.headers.authorization = `Bearer ${getToken()}`;    return config;});

I try everytning check console and network tabe , but unable to solve it , i want to see pdf in network tab in payload


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>