I'd like to save uploaded files to a specific folder, not root. Google's Picker Class Reference specifies using DocsUploadView.setParent("folderID"), however I can't figure out how to access this property in App Maker.
Thanks!
Related
I'am newbie in next js, I trying to create project like Share point that i can create folders, inside a folder are able to create new folder or upload files and inside {this} folder are again able to create folder and upload files.
I can't find another similar scenario online
After clicking the folder (<a></a>) query new params in the url using router.push() without refreshing the page.
from share point
Can anyone shed any light on an issue with the drive picker. The same app
https://developers.google.com/appmaker/samples/drive-picker/
allows select of files but when you try to upload a file you get a "files failed to upload" message (see screenshot)
The app is being run as user so it can't be an identity issue.
By default the Drive Picker has “read only” access to a user’s Drive unless your App Maker application specifically requests “read/write” access. So basically in order to use the upload functionality you need to force your App Maker app to request “read/write” access. The easiest way to do this is to create a new ‘Server script’ and add a simple function that would require write access. For example:
function writeAccess() {
DriveApp.addFile();
}
This function will never be run or called but App Maker will recognize it needs write access to implement it and request it from the user. So simple add the script file and copy and paste the above. Once write access is available for your application you’ll be able to upload files with Drive Picker.
I want to set a push notification for a folder in google drive using google api such that any changed made to any file inside that folder than i get a call -back.
What I know is that its not possible at this moment. Instead of that you can create changes hook and get informed if ANY file on drive is changed. After theat run file search request to find all files within given folder by passing its ID, ie:
"'<folder_id>' in parents"
where <folder_id> is id of the folder where you want to look for changes. You can then look for last modified date and compare to your own cache, for example stored on your server in cache files. If file is newer than do with it whatever you want (and of course update cache).
please refer to:
https://developers.google.com/drive/v2/reference/changes/watch
https://developers.google.com/drive/web/search-parameters
VS 2013, SQL Server 2012, Entity frame, Web API 2
Both project access the same database
Initially my solution has only one project. This project will read and write images. So I save image path in database and save the image itself in this project's folder "~/Images/".
Later I added another project into this solution. This project also need to read and write the same set of images. When I try to read an image saved by the first project (say "~/Images/xyz.jpg") by first getting image path from database and then access it, I was told the file doesn't exist. Then I realize that I was concatenating the first project's domain name and path "~/Images/xyz.jpg". But actually "~/Images/xyz.jpg" is a path in project 1. So apparently this doesn't exist, I even don't have a "~/Images" folder in the second project.
I am going to deploy these two projects to Azure. So I am not going to configure IIS.
How can I solve this problem? Thank you.
I would suggest to use absolute path for getting images. You can introduce a config parameter for your image path (put it in your in web.config) - for example c:\myprojectname\images. Then save only an image filename into the database. When you are retrieving image filename back, concatenate it with absolute path from config and you will be able to access it.
One things. Make sure to check and create the folder if it does not exist on app start.
I am working on a solution which has two projects in it. One is a virtual app which works in another. The first application is the panel and the second is the website. First application can be accessed with "localhost:10001/panel" and the second with "localhost:10001". You see, I created a virtual path for the first app to work under the second one in Visual Studio and they work great that way.
The problem I am having now is about the file uplaod system, "Blueimp's jQuery-File-Upload" plugin and as backend using "Backload". I must say that these work great on a standalone project. That's why I decided to continue the project using these.
But when it comes to a setup which I explained below, I cannot access the files I upload. I installed fileupload system in the panel project, which is accessed as "localhost:10001/panel" so when I leave the default web.config configuration for backload (default is "~/files"), all files are uploaded to the "localhost:10001/panel/files" path. And after the upload when I refresh the page, all uploaded file links are referencing "localhost:10001/files/" without the "panel" folder.
In BackLoad web.config notes how to change and use root upload folders are explained like that
filesRoot: // Root upload folder. If the value starts with '~/' (e.g. ~/files) the path is relative to the web root, otherwise set an absolute local path (e.g. d:/files) [Default: "~/Files"].
I understand that having "~/" at the beggining of a folder reference shows the project's root. But I can't figure out how to reference the upload folder, instead of the default "~/files", to upload and access all files from the second project's root. When I need to reference folder between these two projects I simple use "../", or "/" to access the second project's (site) root. But doing that in "filesRoot" attribute of BackLoad config settings, all file references are starting "///file....." and shows a local path in the computer.
I simply want to upload and access the files from the "localhost:10001/files" location when I upload files from the panel. Now, I cannot even use the "localhost:10001/panel/files" path because files are uploaded to "panel/files" folder, but are accessed from "files" folder with default settings.
BTW: I am using BackLoad's WebForms Example on this project, and this is a Web Forms project.
I ended up using Files folder as a temp folder. At the time of submit, I move the file which is uploaded in Files folder, to the folder of my need. And the problem is solved.
Thanks anyway...