Forum Discussion
- ChayceDuncan2Qrew CadetYou can I believe - the tricky part is the download. You can use API_EditRecord or API_uploadFile to do the upload - but the download, I believe you have to do a GET to the download URL and play with the contents.
Try out doing a GET against the download URL format: https://realm/quickbase.com/up/dbid/a/rRID/eFID/v0 - that theoretically would give you the raw Base64 contents to just copy over to your new record. I've only work with the uploads - so I'm not 100% confident with the answer.
Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base - RyanStanford1Qrew CaptainThat makes sense... Looks like I would need to do a GET for the download URL... then a GET to get the base64... then POST once I have the payload of base64. That makes sense.
I think I was being greedy in trying to do it all in one original GET... Thanks for the pointer, Chayce. - hherschQuickbase StaffIs there a reason you need to actually move the file? Have you considered just passing a URL and keeping the file in the original spot? It is seamless to the user.
- RyanStanford1Qrew CaptainI'm currently thinking it would be easier given that the location table has some custom code to view files from the browser... though it's worth looking into...
As I'm typing this, that might be the way that I'm going. - ScottPughQrew CadetApologies if the answer is right under my nose....but if I want to take your suggested approach of just populating the file attachment URL in a text field- what's the easiest way to do that if I don't want to have a button or anything clicked?.... I just want to populate the URL of a file attachment field (latest version always) automatically and assuming there is a file in the file attachment field.... once I do that I would then share that field down to my child table and then I'd be good to go (for what I need to do)
Thanks for the help
------------------------------
Scott Pugh
------------------------------- MarkShnier__You
Qrew Legend
Scott, does this answer your question?
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=6d1551ee-2bba-4e75-9a0b-082252b1df75&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer#bm6d1551ee-2bba-4e75-9a0b-082252b1df75
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- RyanStanford1Qrew CaptainOk so I'm trying your suggestion Harrison, to at least get it somewhat working.. and I have a really basic problem.
I get the URL of the File attachment, and the plan is to populate that link into a text field on the other table...
I'm getting the infamous "edit record, 0 error, 0 fields changed" api message.
https://<realm>.quickbase.com /db/<dbid>?a= API_EditRecord &rid=1& fid_39_=https:// <realm>.quickbase.com /up/ <dbid> /g/rb/ebg /va/TestInvoice12345.pdf
I'm sure I'm missing something obvious.
**Added spaces in the API URL so you can read it all** - RyanStanford1Qrew CaptainFigured it out... I forgot the leading underscore for _fid_39_