T
Twenty3mo ago
Dream

can't open api imported attachment?

I am importing from a csv file automatically with a Python script. All is working perfectly how I want it with the person import and company assignment. Now I'm trying to attach the original .csv file that i used to import that person onto the "files" section. I've gotten it to actually succeed the attachment, but it errors when trying to download or open that attachment. Here's the error: {"statusCode":400,"message":"Folder is not allowed","error":"Bad Request"} Later on I want to attach a picture alongside this as well, but for now, just the csv is fine Side question: I got the required AuthorID from attaching a file myself and then using the findmultipleattachment function to get my own authorID. What is the proper way of getting this?
7 Replies
Dream
DreamOP3mo ago
Anyone got any idea on this? Havent gotten any further yet
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
@Dream let me check
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
Okay, so as it turns out, it's the same problem I've reported earlier https://github.com/twentyhq/twenty/issues/7325
GitHub
After initial upload of file and checking the content, app throws a...
Scenario: Log in Go to People > record details > (doesn't matter which object as long as it has field with File type) Upload a file if there are no files Click on filename Actual: After i...
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
You can use workaround of renaming any file, after that you should be able to download files
charles
charles3mo ago
This is an issue in the optimistic rendering logic. I think if you refresh you'll be able to get your file. @bob issue is relevant, we will include a patch in 0.32 🙂
Dream
DreamOP2mo ago
Hey guys. Sorry for the Necro. I'm still stuggling with this. I've noticed that the file path when opening the "attached" file is as follows: "/files//twentyscripts/temp_attachments/testcsv.csv?token=" (Note that twentyscripts/temp_attachments/Samuel_Cust_dio.txt is the path that the file is being uploaded from through the python script) If i attach a file the normal way, the URL for accessing the file is "/files/attachment/fcbb98b1-031e-4b51-bcb0-f596299de025.csv?token=" This might be a me problem but I have no clue how to fix it. Maybe I'm importing it wrong? Clearly there's some additional changes being made to the file through Twenty, as the name of the file in the URL also changed to an UUID I'd assume? P.S. Some additional info, the script is basically watches a directory on the twenty instance. Once a csv file is added, that csv is used to create the person or update said person in the twenty database. But I'd like to attach the original CSV file as an attachment for easy access
thomast
thomast3w ago
@Dream do you still need help here?

Did you find this page helpful?