upload fies to storage account for appeal
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
createContainer,
|
||||
getContainers,
|
||||
getBlobs,
|
||||
createBlob,
|
||||
uploadFile,
|
||||
deleteBlob,
|
||||
} from "../../../actions/azurestorage";
|
||||
|
||||
import middleware from "../middleware/middleware";
|
||||
import nextConnect from "next-connect";
|
||||
|
||||
const ApiProxy = nextConnect();
|
||||
ApiProxy.use(middleware);
|
||||
|
||||
ApiProxy.get(async (req, res) => {
|
||||
var containerName = req.query.container;
|
||||
var blobName = req.query.blobname;
|
||||
console.log(containerName, blobName);
|
||||
|
||||
await deleteBlob(containerName, "files/" + blobName).then((data) => {
|
||||
return res.status(200).json({ data: data });
|
||||
});
|
||||
});
|
||||
|
||||
export const config = {
|
||||
api: {
|
||||
bodyParser: false,
|
||||
},
|
||||
};
|
||||
|
||||
export default ApiProxy;
|
||||
Reference in New Issue
Block a user