Is there a possibility to create a cloud repository/storage for certain users to have access to? I was looking for ways to use something like google drive, dropbox, and github on the site but i am not sure where to find an api or some way to implement it...

To sum things up, i just want to put google drive/dropbox/github/etc. on one of my sites for users to be able access files and download them.

Thanks.

Dani AI

Generated

A short, practical plan for this kind of feature.

There are three workable approaches and each has clear tradeoffs — pick one based on whether users must upload/edit files or only view/download them. As hinted, letting an external provider host files is fastest; as and noted, mounting or proxying storage onto your server gives more control but adds auth, scalability and security work; and as suggested, think about versioning/collaboration up front because it changes the design.

Recommended architecture (safe, scalable pattern)

  • Store file bytes in an object-storage bucket (S3-style) and keep file metadata (owner, permissions, filename, mime, size, versions) in your database.
  • For downloads/uploads use short-lived signed URLs so browsers talk directly to storage for bandwidth-heavy transfers; fall back to a server proxy only when you need opaque access control or auditing.
  • For users who want to link their own accounts, implement an OAuth-style “connect account” flow and persist tokens encrypted; map provider account IDs to your user records.

Practical UX/security notes

  • Decide write vs read-only first — that decision drives whether you need upload endpoints, quotas, conflict resolution, and UI for edits.
  • Support resumable/chunked uploads for large files and enable byte-range downloads for streaming.
  • Enforce HTTPS, validate mime/types, sanitize filenames, scan uploads for malware, and implement soft-delete/version history and storage quotas.
  • Use correct headers (content-type, content-disposition) to make code preview or forced download behave correctly, and front static content with a CDN for performance.

Quick starter checklist

  1. Build a minimal POC storing files on your server with a DB mapping. 2) Add signed direct uploads to object storage. 3) Add account-linking (OAuth) if you want users to connect external storage. 4) Harden auth, token storage, quotas and scanning before opening to others.

This path keeps the UI simple for visitors while giving you control over access, costs and scaling as needs grow.

Recommended Answers

All 15 Replies

I think there is. most of these cloud services provide you with public url for accessing you file. so i think the way to go is manually generating these url and putting it in ur web page

commented: Yep. +10

You want your users to use your site to get to their storage? Or you want your site to connect to cloud storage so you have the ability to provide storage for users?

commented: Yep. +10

If you want to try, you could mount the drive to your server. But then you will need to implement authentication to identify that it is your user (may use .htaccess) in order to be sure who they are.

However, the way you want to do kind of defeating the idea of having your own private storage. Why not letting them access the drive directly??? Or you don't want to complicate them with the setting???

commented: a bit complex, but I am gonna put that on my to-do list :) +10
Member Avatar for Member #120589

So sounds like you want to create a shared repository? If users only have read rights, you may be just as well off with 'normal' fileserver storage. Will your users have delete, upload, edit rights?

https://www.copy.com/home/

Works great for me, not too sure how it'll do for your requirements but take a look!

commented: i am gonna look into that. +10

Well... all i am basically doing is making a site that stores all my code online. I want to use something like Google Drive and literally put on my site so that I or other can access it. Does any of those big companies provide any api's for this?

Member Avatar for Member #120589

You still haven't answered whether you want your users to have write access to these files or have rights to upload their own files. This may determine which api or filesystem you adopt.

Why don't you just use jsfiddle or pastebin and provide links to that?

Haven't used it, but what about this? http://phpfiddle.org/

commented: i like the link for other purposes +10

You still haven't answered whether you want your users to have write access to these files or have rights to upload their own files.

Sorry about that, I didn't realize I forgot to answer that. I want to have the users to be able to access the files.

Why don't you just use jsfiddle or pastebin and provide links to that?

I want to personalize and have it on my own site. I always like to try new things even if it is going to be harder or not.

Haven't used it, but what about this? http://phpfiddle.org/

I haven't thought about that. I am going to have a look into that link.

For some odd reason, I can't edit my last post. Anyways, I am exploring the link you provided me. I like what that site offers but I am curious to know, how do I use it in order to meet my needs?

Some clarification is needed...

There is a difference in storing code so that others can view and access vs creating a site that let's users run and execute code.

The first is easier and all you need is space to store the info either in a database table or other source like flat files

Member Avatar for Member #120589

http://blog.codepen.io/documentation/api/url-extensions/

Some code sites have apis which allow you to embed code stored on them to your own site.

i am basically doing is making a site that stores all my code online.

If you need code versioning or collaboration too, there are ways to setup git (for example) on your shared host.

Member Avatar for Member #120589

I'm still struggling with whether or not users can 'change' your files from what you say:

I want to have the users to be able to access the files.

In response to my question:

You still haven't answered whether you want your users to have write access to these files or have rights to upload their own files

So do they have write access or not??

If you want a best and simple cloud storage, I suggest you should go for Free CloudBacko IT solution. CloudBacko is simpler in the sense you don’t need to install it rather you can only login through your favourite social media account. You can save up to 100 TB of free data storage. It supports majorly Windows, Mac, Linux ,etc. Check here http://free.cloudbacko.com/

Have you thought about something like ownCloud? Its php based and works pretty good. Also has mobile apps. Click Here

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.