-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
xlsx is crashed after upload but csv is fine #260
Comments
Some mobile operating systems do weird things to image formats when uploading, but I haven't heard of this happening for You didn't mention where your resolvers are streaming the files to. It it were me, I would try doing a very basic upload to the local filesystem in resolvers and see if the files are correct. If you are streaming it up to a cloud storage, perhaps their SDK or processing is at fault, and not your An out-there idea, but maybe you have a virus on your machine modifying |
Here is my codes and I am using with apollo-server-lambda and apply the middleware like
And I also running it among different devices, all have the same issue |
Note that AWS Lambda is not officially supported, see: Sometimes the file type is a red-herring, and the real difference that causes a bug is actually file size. Are you sure you are testing |
the testing .xlsx file size is 16KB, and testing .csv file size is 8KB. After uploading, .xlsx file increased to 24KB while .csv does not change. |
Try uploading a 16 KB |
I just tried to upload a 27KB .csv, it is working fine. The testing 27KB .csv is coverted from the testing 16KB .xlsx file |
Do you have any suggestion @jaydenseric |
I just tested uploading a ~33 KB I'm not sure what your problem is, but there is something problematic about your particular project code, dependencies, or environment. As previously mentioned, AWS Lambda is not specifically supported by this project as it doesn't properly support streaming multipart requests. If you want to persevere, try a process of elimination. Use the browser network inspector to make sure that the client is sending a valid GraphQL multipart request. Try using a regular Apollo Server instead of the Lambda version, etc. Whatever you find the problem to be, share it here! I'm interested to hear the answer. |
I figured it out yesterday. Forgot to add multipart/form-data in Binary Media Types for api gateway. It is my fault. Thank you for your help. |
For xlsx file, after I upload, the file size increase from 16kb to 24kb, and pop up error when I try to open it
Excel cannot open the file ’xxxx.xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
For csv file, the file size does not change and csv files are able to be opened.
Anyone has any thought?
The text was updated successfully, but these errors were encountered: