0
본 가이드를 따르고 있습니다. Google 드라이브에 이미지를 업로드 할 수는 있지만 파일 경로를 가져올 수 없습니다.api를 통해 Google 드라이브에 업로드 한 후 파일에 대한 링크를 얻는 방법은 무엇인가요?
https://gist.github.com/ivanvermeyen/cc7c59c185daad9d4e7cb8c661d7b89b
// Get img that was uploaded to my server
$img = request()->file('img');
// Save that image to my google drive
Storage::disk('google')->put('img.png', fopen($img, 'r+'));
// ?? how do I get the path to the file so I can save it in my database?
img.png 파일의 이름입니다. 그래서 그렇게하면 빈 파일이 저장됩니다. 파일은 $ img이고 im은 img.png로 저장합니다 – jeff923
URL을 얻으려면 파일 이름을 사용해야합니다. 그게 뭐가 잘못 되었나요? 너 해봤 어? 어쩌면 마지막 줄 다음에'dd ($ url)'을 추가하십시오. – PKeidel