Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable default bucket level prefix? #668

Closed
alexsmartens opened this issue Apr 16, 2018 · 4 comments
Closed

How to disable default bucket level prefix? #668

alexsmartens opened this issue Apr 16, 2018 · 4 comments
Labels
feature-request Request a new feature pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. Storage Related to Storage components/category

Comments

@alexsmartens
Copy link

Here is original MyS3Bucket structure:

.
├── MyFolder1
├── MyFolder2

After using Amplify it's changed to this:

.
├── MyFolder1
├── MyFolder2
├── public 
|   ├── MyFolder1
|    |   ├── FileName

Here is how I put objects to the storage:

   Storage.put( '/MyFolder1/FileName', blob, { contentType: 'image/jpeg' })
    .then(result => {
      console.log('--result')
     console.log(result)
    })
    .catch(err => {});

I also tried

   Storage.put( '/MyFolder1/FileName', blob, { contentType: 'image/jpeg' , level:'public' })
    .then(result => {
      console.log('--result')
     console.log(result)
    })
    .catch(err => {});

and

   Storage.put( '/MyFolder1/FileName', blob, { contentType: 'image/jpeg', level:'private' }) })
    .then(result => {
      console.log('--result')
     console.log(result)
    })
    .catch(err => {});

which basically stores the files to directories with the public or private root correspondingly.

PROBLEM: how to disable the default prefix (public or private ) to be able to store files directly to folders in the bucket (to MyFolder1 for example) ?

@richardzcode richardzcode added feature-request Request a new feature Storage Related to Storage components/category labels Apr 16, 2018
@richardzcode
Copy link
Contributor

The default public/private directories has default security policy setup by MobileHub. They are convenient for many use cases. However we do see other cases. My colleague is working on the request. Will be available soon.

@stale
Copy link

stale bot commented Jun 16, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Jun 16, 2019
@stale
Copy link

stale bot commented Jun 23, 2019

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. Storage Related to Storage components/category
Projects
None yet
Development

No branches or pull requests

2 participants