How to auto upload attachment file to Google Site? - java

I have a file ( lets say text ) on my local computer shared with some other people on network. As it is local I can't access the file from some other place via internet. So I uploaded a copy of text file on Google site. Now what I want is whenever someone edits text file, I want it get uploaded to Google site.
So that latest copy can be accessed from outside. I can't use drive or Drop-box sync. They are blocked.
Any help or alternative solution is appreciated. I am not looking for any paid alternative. I am comfortable with C++, C# or Java for solution.
I found a duplicate question.But it is 4 years old. API must have deprecated by this time.
Upload file to a Google Site from C# Code
Thanks in advance:)

why don't you use google docs/sheets for the document and then link the document or directory in the site.
given the appropriate permissions users can then do what they want
you can then edit the document, and using google drive on your pc, and that will auto-upload and be reflected in the site

Related

How to Store application-specific data of the android kotlin app in user's google drive?

I want to use the user's google drive as a database to store the app-specific data in his drive. To use it as a backup drive.
Now there is this documentation which is suppose to help how to implement it as the google says we can achieve this using google drive apis.
But there is not a single article that can help me to integrate it completely from a to z.
Some post i found but they are not again specific to the this use case i.e. "Store application-specific data". Also they are outdated
Can someone provide an up-to-date Android guide for Google Drive REST API v3?
Integrate Google Drive REST API on Android App
Im not exactly sure I understand what your issue is, so let me try to explain the documentation page for Store application-specific data that appears to be unclear to you.
Uploading to the app data folder is done exactly the same as uploading to any other folder. With three differences.
First off when you authorize your user you will need to use the scope of DriveScopes.DRIVE_APPDATA, This scope gives you access See, create, and delete its own configuration data in your Google Drive. Which will mean that you can only edit data that your application created.
Second. When you upload the file. The file type must be .json. Configuration files are .json thats it.
Finally when you upload the file you set the parent directory to appDataFolder.
var fileMetadata = new Google.Apis.Drive.v3.Data.File()
{
Name = "config.json",
Parents = new List<string>()
{
"appDataFolder"
}
};
That's it, that is the only difference with google drive api and uploading to appDataFolder. Any google drive api upload example can be used.

Why do hyperlink in a document result in Page not found

I have written a Windows Java app (using NetBeans) that (a) uploads pdf files using FTP to my WordPress website, and (b) generates emails with embedded links to the various pdf files. E.g., the email recipients might get a email containing:
"...Here are PDF files containing the Placards. There's a separate PDF file for each Division for convenient printing on paper of different colors.:
To view Championship and Special Click on View"
where View is a hyperlink to the pdf previously uploaded to the website.
The app worked perfectly for several years and then I changed my hosting service to SiteGround. Now the hyperlinks bring up Page not found (404), even though FileZilla shows the uploaded files exactly where the hyperlinks indicates they should be.
SiteGround tech support told me to put the files below public_html, e.g. /concoursbuilder.us/public_html/JOCLA/MovieStars/Placards
This did not help.
I figure it must be a Java programming error because obviously FileZilla knows how to do it. Naturally, SiteGround is reluctant (unwilling?) to get into my Java programming issues. I'm at my wits end.
Any suggestions?
The problem is solved, thanks to answers to basically the same question, https://stackoverflow.com/questions/46417961
In a nutshell, it's a matter of FTP uploading to public_html at the site so that it is at the same level as the site. See the FileZilla structure shown below. You FTP upload is uploaded to public_html. And here's the punchline: The URL for public access is the same as used for FTP upload* but with out public_html*.

Protect tab/range in Google Sheet via Drive API for Java

I have an application that creates Google spreadsheets through Java code. I have looked through the permissions section in Google Drive API and I'm going to give edit access to anyone with the link.
In certain sheets I need to make only one tab 'view only', i.e. protect that tab. Is it possible to do this via Drive API?
Is it possible to give a name to the current version of the file via Drive API?

Suggestions for In-browser word editing

I work at a transcription company that stores physician's transcriptions on a central file server. Users are able to access our website and open up the transcription (a .doc file) to view, edit, e-sign, print, ect.
Currently, when the user goes to open the document, it uses a Java application and the local computer's Microsoft Word to open an instance of the document. Currently there are limitations to the application though.
Only Windows OS compatible (due to the Java COM operation)
Only 32-bit Java compatible
Difficult to replicate for mobile application
My question was, is it possible to have an in-browser editor, with the functionality of Word, that is able to pull and open Microsoft Word documents from a file server and allow users to make edits and save them across Windows and Apple OS, with possible mobile app integration as well?
A friend at Google suggested using Google Docs, which would require google accounts and a BA agreement, creating a little too much work on the client side. Any suggestions would help.
Thank you!
Of course a native docx editor would be best, however, you can convert to XHTML, edit with CKEditor, then convert back to docx.
This blog post of mine ignores the details/intricacies involved in doing that, instead jumping ahead to explain how to track content through that process.

Listing files and getting information of a public folder from google drive

I created a public folder in google drive. Now i want to access it from my android project. To list files of the folder and to download files from it. But i am not getting any way. Search too many blogs and here in stackoverflow ansers. But none of them is working for me.
I don't need to access users google drive. Its my account google drive where i created a public folder and places files into there.
Please help if anybody have straight forward answer for my use case.
Thanks in advance.
It seems you want to access the Google Drive Files of your Account, But to get to that you can either access the files using a Android native Google Drive application or Google Drive Sponsored Api for accessing User's files (The User and the developer being yourself !). Its either of the two options you have to follow for now, as google hasn't looked into the requirement you wanted. you might leave a comment for your requirement at google discussions.

Categories

Resources