DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Upload Profile picture save on Amazon s3

Sort:
You are not authorized to post a reply.





New Around Here





    A) I want to save the profile picture on Amazon s3. So the profile pic URL will be the Amazon s3 link. Please, advise me how we can do this? Is there a way to change all files and user profile pics and file save to AWS s3?

    B) At least is there a way to save the profile pic url programmatically without referring to the portal path? If I can upload a profile picture image in a separate page with external Amazon s3 file, that is also fine.

    Please, help.






    Veteran Member





      Out of the box, DNN cannot do this. DNN has a connector that allows you to access files stored on Azure.

      However, thanks to DNN's extensibility there's a module for that: DNN Global Storage from Evotiva.com. Evotiva is one of the long time, premier providers of cool modules for DNN. It supports S3 and a list of other providers.

      Caveat: I've never used this particular module, so you'll need to check all of the features yourself. But, I have used other modules from Evotiva, and they work as advertised.
      Joe Craig
      DNN MVP
      Patapsco Research Group





      New Around Here





        Thank you very much for your reply.

        Please, let me know how can I do this then. I will save the default DNN profile image functionality. Not using Amazon S3. But use the default file saving path. But I need this to do in a separate module via a file upload control. Is there a way to move this file upload control or functionality to another placed?
        Please, can you advise me the exact way to do this?
        I need to use a custom file upload control or the same profile picture uploading control part in another place. I will use a custom form to update other profile properties.

        Thank you.






        Veteran Member





          As I said, I haven't used the module. There is documentation.

          For your other questions, probably some more details are needed.

          For the custom module that uploads the profile image and other profile properties, you should make sure that you use the DNN API to modify profile properties, and you should be all set.

          As for "custom forms" you might want to take a look at Action Form. It is delivered with tools built in that can modify profile properties from form data.
          Joe Craig
          DNN MVP
          Patapsco Research Group





          New Around Here





            Thank you for your reply.

            I am not asking about the Evotiva module. I am asking my own custom module.

            I just want to know, if I can use a file upload control and save button on an ascx control in my custom module module. That should save/update the logged-in profile avatar image.

            What would be the C# code for this?
            It should work same as the DNN edit profile page.

            Please, can you advise?





            Veteran Member





              Yes, you can do all of that. If you Google around, you may be able to find some examples. Also, though it was written a few years ago, Mitchel Sellers book on module programming is still a good source.

              Once you have all of the data, updating the user's profile is a snap.
              Joe Craig
              DNN MVP
              Patapsco Research Group





              Veteran Member





                I wouldn't suggest trying to circumvent the way that avatars/profile pictures work in DNN.  Long-term, it would just lead to issues in maintaining it from version to version and it could even break due to other extensions (themes and modules) on the page(s) where the profile pictures are.

                The suggestion to use a folder provider is rock-solid, and I've used the Evotiva GlobalStorage provider with great success myself. 

                I haven't tried it with the Users folders myself, but it should theoretically be possible.  It's just tricky since it's a built-in folder.  You'll not only want to be very careful with the initial implementation of this, but you'll want to test this thoroughly each time you upgrade.  

                In general, when you replace an existing folder with one that is using an external data store like Amazon S3, I've followed the steps below and have had no issues so far.

                1. Install the folder provider (and configure it, if necessary).
                2. Create the desired bucket in Amazon S3.
                3. Add a new folder from within DNN using the advanced features to specify the folder provider and its respective settings (e.g., Users2).
                4. Copy all of the files and folders from the original folder (e.g., Users), to the new one - again, from within DNN (e.g., Users2).
                5. Delete the original folder (e.g., Users).
                6. Rename the new folder to the original folder name (e.g., from Users2 to Users).

                The benefit of this approach is that all of the file and folder management features in DNN will just automatically use this new file storage location without you doing anything else.  All of the upload and browsing features will function as if they were native (local) folders.  However, under the covers, the files and folders live in the cloud location of your choosing.  No development, workarounds, or hacks are necessary.

                I hope this helps.  :) 






                New Around Here





                  Can anybody help me clarify one thing? What details do you need to show when registering on Amazon? Is that safe to show your personal details like a postal address? I have stated all my information including zip code PostcodeFinder.net. Now I am worried it can be used somewhere. How did you register here? I would be very interested to learn this information from the real users. Thanks a lot.

                  You are not authorized to post a reply.

                  These Forums are dedicated to the discussion of DNN Platform.

                  For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                  5. No Flaming or Trolling.
                  6. No Profanity, Racism, or Prejudice.
                  7. Site Moderators have the final word on approving / removing a thread or post or comment.
                  8. English language posting only, please.

                  Would you like to help us?

                  Awesome! Simply post in the forums using the link below and we'll get you started.

                  Get Involved