If I have form where user can upload files via Ajax (and upload is available only when JavaScript is turned on) and some other text fields etc. What if is user opens a new page for same form. Should that show already uploaded files, or are uploaded files only related to page where files where uploaded? I am asking this because I don't know what is common convention in these kind of situations.
I don't know that there is any convention, but if you have an authenticated user and you know that the user has uploaded a file for a certain form, I think it's a good idea to present the already uploaded file on the second instance of the form.
Key benefits are time, space and bandwidth saved by discouraging duplicate uploads. Another benefit is the perception that you are helping the user accomplish their task by eliminating the need to re-upload a file.
And I can't think of any drawbacks to showing the already uploaded files.
Hope this helps!
Related
I need to be able to provide an HTML form that allows users to upload a file to a particular bucket. I also need to be be to create a sub folder within the Bucket which relates to the users email (passed from the form). If the sub folder exists then upload the file otherwise create a new folder etc.
You can use php to do that. I wrote a phone script sometimes ago that can upload any image, resize it and even move it from one folder to another, If I happen to come back online, I could upload the script but you might need a little php experience to use it. So I suggest you try to learn php, most importantly OOP
We have students' attendances files shared with their families (commenter permission only).
It seems that some of the sharings weren't correctly done in the first time, when the script created the files.
So I want to do a bulk re-sharing with them, but not sending any email. They are more than than 500 families, and I don't want to disturb or confuse them with a message.
file.addCommenter seems to send an automatic email.
is it possible not to send it?
Thanks,
Enrique
I guess the simplest thing to do it to move all these files in a folder and manually assign the right permissions to this folder.
This way you control easily the common access rights of all the included files.
A script could help you to move the files, you'll find a lot of examples of such code here on StackOverFlow.
I'm aware of shortcut links. Looking for behavior similar to that of a native Google doc. File exists, possibly takes up storage, can be renamed/moved/deleted, but the data inside shouldn't be modified except by the app. Possibly, defining export formats/links.
I believe the answer is a simple "no" - Google Drive is for storing user files, not protected application data or configuration data. So you could put a file to a users drive, but only the owner of the drive can control whether the file is shared or changed. So they can edit it, you can't stop them, and there's no reason to think that'll ever be a feature in the future.
To have such control you will need to store such data on your own server, or some other such storage medium.
The only other thing that you would do with only Google Drive is encrypt the configuration file you store, for instance, so it couldn't be easily edited - but that's probably just a bad idea. If you must save a configuration file to a persons drive, bury it inside an application folder and sanity check it to ensure it isn't corrupt - but don't count on a person or application never opening and editing it. If it's something a person shouldn't be able to read or change, don't save it to their drive.
As of April 2012, application data is supported: What is the Application Data folder?.
"Export format links" could be done with Custom file properties, though, I'm unsure of what kind datatypes are supported for the value beyond the example string.
I have a path to a file on the users local system. When the user clicks on that path, the file should open so that the user can view it.
I know that there are lots of limitations on this since we cannot access a users local file due to browser security issues.
Now, I read about HTML5 and it's FileReader API, but all the code examples I see online select and upload the file, and I'm not very clear about whether it is possible to do what i want with it.
Maybe I haven't looked at the right places yet, but anybody know about this?
HTML5 does not allow directory upload.
But inevitably, some users will end up uploading a folder, because they don't know about HTML5 rules.
The uploaded folder is just a small file.
How should I handle those cases?
Should I pretend the user really wanted to upload this small (probably meaningless) file?
Should I try to check if uploaded file is actually a folder, and warn the user if it is? (the actual data of a folder file is different on every OS, so not that easy)
Is it the browser's fault, should Chrome prevent the user from HTML5-uploading a folder?
Note: Alfresco uses the first strategy. If you know any application that uses the second strategy I would be glad to hear about it.
Alfresco has recently changed their strategy to the second strategy.
If the uploaded item is a folder or has a null size, it is refused server-side, and the Web UI tells the user.
I guess it is the best thing to do for now.