I have a deep interest in Mobile and Web development. Especially Android, however, I am also currently teaching myself iOS Development.
At this current moment in time, I am in my 4th year of University studying Software Engineering. My dissertation requires knowledge of server-side scripting so I will be asking a lot of questions in regards to Python and possible PHP
Nothing here yet.
No blogs yet.
So the code you attached works to create new files in the google drive, however, file_metadata doesn't have anything like fileContent: "blah blah". It still requires a file path. Following from the code displayed in the StackExchange link they create a file locally and upload it to the google drive. it's a potential solution I have been playing around with for a couple of days now. I guess it isn't possible to use URI's as file locations or dump strings in the tag. Thanks for the help anyway.
I don't understand. I've attached my source code, am I doing something wrong? can't seem to find any trace of the file in my Drive. Are you sure the python drive API is capable of doing this? filename = "test.txt" drive_service = build( 'drive' , 'v3' , credentials=creds) file_metadata = { 'name' : filename} file = drive_service.files().create(body=file_metadata, media_body= "test" , fields= 'id' ).execute() print ( 'File ID: file.get(' id '))
Appreciate the answer but I think you misunderstand how the Google Drive API works. I currently use Python FLASK in order to handle serverside API calls so I use the python scripts provided by the Drive API team. MediaFileUpload requires two arguments, a file path, and a mime type for the specified file. Unfortunately, it will not take strings and convert them into files as this function handles the upload API call. The only way to send a file is by providing a valid file path otherwise it returns this error - [Errno 2] No such file or directory: 'use this string as file content'. That is why I was asking if it was possible to use a URI as a file location, or any other temporary file path alternative
Personally I hate the idea of surviving off of savings. If I was to win the lottery I would feel like I was cheating. I would take some money out to improve things (new computer, new TV, new car, etc...) but the rest would go in an ISA. I would keep working and coding until I reach retirement and whatever I have in the pot I will use to survive
Interesting concept, but merging individual files seems like a moot point. When you branch off you usually branch off with the intention to add or edit specific files, while someone else works on another section that targets different files. If you are thinking of adding in extra functionality on one branch that directly interfaces with scripts stored on the branch someone else is working on you would usually branch off and implement those scripts after the original branches have been merged. It is an interesting point, however, I feel like doing this would ultimately result in merge conflicts