Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on upload.ts #31

Open
kevinbaroro opened this issue May 29, 2023 · 1 comment
Open

Issue on upload.ts #31

kevinbaroro opened this issue May 29, 2023 · 1 comment

Comments

@kevinbaroro
Copy link

``Hi @dissorial, I have tried to deploy the app in the azure web app, I have successfully deployed it but I have encountered one issue which I'm hoping you know what's causing below issue.

A. When I tried to upload a file it says on the network reponse "{"message":"Files /tmp/BSzeVfW4xjD0TZ8ncpF_T99A.pdf uploaded and moved!"}"
B. Right after uploaded I add a namespace name "Test" and clicking the Ingest button and the network response "{"message":"Data ingestion complete"}"

I'm assuming the above events will created a pinecone data but it's not happening.

To give you context on what I change on the code to make the deployment worked.

  1. I changed the env to this NODE_ENV=production.
  2. Since the current code when deployed in the azure web app wont work when I upload a file and ingest it will give me an error "EXDEV: cross-device link not permitted" on the file I uploaded.
  3. So I change the upload.ts in the part of
    if (process.env.NODE_ENV !== 'production') to if (process.env.NODE_ENV == 'production')
    to force to use the development code instead of the production code and after that I get the A and B results above and it's not creating the Pinecone index and it is also not uploading the file in the web app.

I hope my points above is clear.
Hoping for your response. Thank you.

@dissorial
Copy link
Owner

Hi,

I believe this issue is happening because in upload.ts, we are temporarily uploading files to a tmp directory, which is provided by Vercel once the app is deployed. I'm quite certain that Azure does not provided the exact same thing on deployment, which means that handling uploads will likely be broken. To solve your problem, you may need to look up how to upload files to a temporary storage on Azure, and modify the code in upload.ts accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants